panoptes / POCS

An Observatory Control System for the PANOPTES citizen-science project designed to help find transiting exoplanets! :telescope: :stars:
https://pocs.readthedocs.io/en/latest/
MIT License
80 stars 49 forks source link

Task Manager #1167

Open wtgee opened 2 years ago

wtgee commented 2 years ago

Adding a celery task manager that will become the basis for much of the future POCS operation. Maybe. ;)

For now the simple command line utilities will start and stop the messaging (rabbitmq) and results backend (redis) using the python docker sdk.

Usage: pocs tasks [OPTIONS] COMMAND [ARGS]...

  Interact with the TaskManager.

Options:
  --help  Show this message and exit.

Commands:
  start-backends  Start the celery backends specified by the config.
  stop-backends   Stop the running celery backends specified by the config.

Description

The celery distributed task manager will allow for a number of tasks to be run in a distributed manner. For the POCS core this can include things that need knowledge of the time (e.g. startup at sunset rather than issue a sleep timer at sundown), but can also start to serve as the basis for distributed hardware control (e.g. the forth-coming task-based gphto2 camera class).

codecov[bot] commented 2 years ago

Codecov Report

Base: 83.08% // Head: 73.04% // Decreases project coverage by -10.04% :warning:

Coverage data is based on head (3dae082) compared to base (4908119). Patch coverage: 51.27% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1167 +/- ## ============================================ - Coverage 83.08% 73.04% -10.05% ============================================ Files 86 96 +10 Lines 7425 8072 +647 Branches 635 896 +261 ============================================ - Hits 6169 5896 -273 - Misses 1083 2036 +953 + Partials 173 140 -33 ``` | [Impacted Files](https://codecov.io/gh/panoptes/POCS/pull/1167?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes) | Coverage Δ | | |---|---|---| | [...c/panoptes/pocs/camera/gphoto/celery/controller.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3MvY2FtZXJhL2dwaG90by9jZWxlcnkvY29udHJvbGxlci5weQ==) | `0.00% <0.00%> (ø)` | | | [src/panoptes/pocs/camera/gphoto/celery/settings.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3MvY2FtZXJhL2dwaG90by9jZWxlcnkvc2V0dGluZ3MucHk=) | `0.00% <0.00%> (ø)` | | | [src/panoptes/pocs/camera/gphoto/celery/worker.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3MvY2FtZXJhL2dwaG90by9jZWxlcnkvd29ya2VyLnB5) | `0.00% <0.00%> (ø)` | | | [src/panoptes/pocs/camera/gphoto/remote.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3MvY2FtZXJhL2dwaG90by9yZW1vdGUucHk=) | `0.00% <0.00%> (-21.57%)` | :arrow_down: | | [src/panoptes/pocs/sensor/power.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3Mvc2Vuc29yL3Bvd2VyLnB5) | `40.23% <0.00%> (-1.74%)` | :arrow_down: | | [...rc/panoptes/pocs/state/states/default/analyzing.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3Mvc3RhdGUvc3RhdGVzL2RlZmF1bHQvYW5hbHl6aW5nLnB5) | `5.55% <0.00%> (-54.45%)` | :arrow_down: | | [...rc/panoptes/pocs/state/states/default/observing.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3Mvc3RhdGUvc3RhdGVzL2RlZmF1bHQvb2JzZXJ2aW5nLnB5) | `13.33% <0.00%> (-62.86%)` | :arrow_down: | | [src/panoptes/pocs/state/states/default/tracking.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3Mvc3RhdGUvc3RhdGVzL2RlZmF1bHQvdHJhY2tpbmcucHk=) | `6.66% <0.00%> (-76.67%)` | :arrow_down: | | [src/panoptes/pocs/utils/cli/main.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3MvdXRpbHMvY2xpL21haW4ucHk=) | `0.00% <0.00%> (-70.00%)` | :arrow_down: | | [src/panoptes/pocs/utils/database.py](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes#diff-c3JjL3Bhbm9wdGVzL3BvY3MvdXRpbHMvZGF0YWJhc2UucHk=) | `0.00% <0.00%> (ø)` | | | ... and [74 more](https://codecov.io/gh/panoptes/POCS/pull/1167/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=panoptes)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.