-
Notifications
You must be signed in to change notification settings - Fork 144
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
Store canonical recurring tasks in the DB #272
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rosa
force-pushed
the
persist-recurring-tasks
branch
4 times, most recently
from
August 6, 2024 11:27
194a738
to
6b1f62e
Compare
So we can persist them in the DB and support dynamic tasks, more complex serialized arguments and enqueuing them on-demand from Mission Control more easily.
That uses Active Job's arguments serializer/deserializer.
So we can differentiate dynamic ones to not delete them.
And delete them when the schedule is unloaded.
PostgreSQL fails and aborts the current transaction when it hits a duplicate key conflict during two concurrent INSERTs for the same value of an unique index. We need to explicitly indicate unique_by to ignore duplicate rows by this value when inserting
…ng tasks These will be used later on.
Very similar to inserting recurring tasks on boot. PostgreSQL fails and aborts the current transaction when it hits a duplicate key conflict during two concurrent INSERTs for the same value of an unique index. We need to use `insert` instead of `create` here and indicate unique_by to ignore duplicate rows by this value when inserting
rosa
force-pushed
the
persist-recurring-tasks
branch
2 times, most recently
from
August 6, 2024 12:12
d9890bc
to
dfa51d1
Compare
rosa
force-pushed
the
persist-recurring-tasks
branch
from
August 6, 2024 12:45
dfa51d1
to
c2ec696
Compare
rosa
added a commit
to rails/mission_control-jobs
that referenced
this pull request
Aug 6, 2024
rosa
added a commit
to rails/mission_control-jobs
that referenced
this pull request
Aug 14, 2024
rosa
added a commit
to rails/mission_control-jobs
that referenced
this pull request
Aug 14, 2024
rosa
added a commit
to rails/mission_control-jobs
that referenced
this pull request
Aug 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a pre-requisite to add support for dynamic recurring tasks in the future and to allow for the execution of a task on-demand, for example, from Mission Control.