-
Notifications
You must be signed in to change notification settings - Fork 188
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
Drop the DbCalcState
table
#2198
Drop the DbCalcState
table
#2198
Conversation
@giovannipizzi a related problem to what you were discussing with leopold today. For this PR I removed the |
Ah maybe the old models will be serialized and stored somewhere once I put in the migration to actually delete this model. I will check this tomorrow |
A few interesting notes:
|
38f64d2
to
b58af1f
Compare
b58af1f
to
1444480
Compare
1444480
to
7dc049d
Compare
The `DbCalcState` table was introduced to both keep the current job state of `JobCalculations` but also to function as a sort of locking mechanism to ensure only one process was operating on a job at a time, by enforcing progressive state changes on the database level. In the new system, this responsibility is taken care of by the `Runner` class that is running the task corresponding to the job calculation. The calculation state is now merely set as on the node for informationalpurposes to the user. Therefore, the simpler solution is to set the job state as a simple attribute and remove the `DbCalcState`. This also means that the `IMPORTED` calc state is now obsolete, as that was needed to prevent imported calculations from being picked up by the daemon, which used to determine what calculations to run based on its calculation state.
7dc049d
to
7ac53ae
Compare
Fix #2197
The
DbCalcState
table was introduced to both keep the current job stateof
JobCalculations
but also to function as a sort of locking mechanismto ensure only one process was operating on a job at a time, by enforcing
progressive state changes on the database level. In the new system, this
responsibility is taken care of by the
Runner
class that is running thetask corresponding to the job calculation. The calculation state is now
merely set as on the node for informational purposes to the user.
Therefore, the simpler solution is to set the job state as a simple attribute
and remove the
DbCalcState
. This also means that theIMPORTED
calc stateis now obsolete, as that was needed to prevent imported calculations from
being picked up by the daemon, which used to determine what calculations to
run based on its calculation state.