raises exception if background and wait_until_complete flags are not set...#64
raises exception if background and wait_until_complete flags are not set...#64paiweilai wants to merge 1 commit intoYelpArchive:masterfrom paiweilai:paiwei-check-flags
Conversation
There was a problem hiding this comment.
Please add a reason why this combination is invalid.
There was a problem hiding this comment.
Agreed - this is definitely a valid combination. The "background" flag simply specifies if this is a foreground or background job. The "wait_until_complete" flag specifies whether we're blocking until we get our response. It is possible (and probably encouraged) to not block on a foreground job.
There was a problem hiding this comment.
If jobs are sent as foreground, the gearmand server will not put them in
the queue (e.g. MySQL).
The server starts run these jobs after 'wait_until_jobs_accepted'.
However, because the submit_job method returns to the caller shortly after,
what will happen is that most of these foreground jobs will be dropped by
the server and not executed.
(I have an example code confirmed this.)
... properly