[WIP] queue_job: extract controller's runjob as JobExecutor#945
Draft
guewen wants to merge 2 commits into
Draft
Conversation
Contributor
|
Hi @sbidoul, |
9ca3275 to
5d8cd0c
Compare
Rough draft of API changes we could do (well, a direction), not taking account of backward compatilibity yet, not considering everything etc.. Main ideas * keep the Job pure data, not linked to an env * A Job only exists when the db record exists, and when performed, the execution environment must be passed * The Executor will have to deal with a control env and an execution env Classes: * JobSpec is a "handler" for a job to be enqueued, the delay transforms JobSpec to actual jobs, stored through JobStore * JobStore takes care of the side-effects in the database * JobPayload is the recordset, args and kwargs tied to an environment * Executor takes care of the execution of a job (previously mainly in the controller)
This file contains hidden or 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
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.
Draft / experiment around job execution / state and env management