Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Status Transition Logic #183

Open
sivkovic opened this issue Apr 6, 2021 · 0 comments
Open

Refactor Status Transition Logic #183

sivkovic opened this issue Apr 6, 2021 · 0 comments

Comments

@sivkovic
Copy link
Collaborator

sivkovic commented Apr 6, 2021

Move logic for what happens when a status is changed to the model. E.g. if a Job goes from RUNNING to COMPLETED, we can update the finished_date in the save function similar to how it's done in Beagle -- so the business logic in the check_status_of_jobs task is easier to read.
- Status should only be updated in a single place - remove all status changes from all other methods
- FAILED jobs we'd just have the decorator catch exceptions
- Remove functions with side effects like update_message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant