-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix bug where jobs may have been recovered before the MQ callback was set on the manager. - Add a new LOST job state for jobs that cannot be recovered and the Pulsar is going to abandon. - Fire off callback for LOST jobs. - Add test case to verify callback is called for LOST jobs.
- Loading branch information
Showing
6 changed files
with
105 additions
and
22 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
# TODO: Make objects. | ||
|
||
# Job is staging about will be queued shortly. | ||
PREPROCESSING = "preprocessing" | ||
# Job manager has queued this job for execution. | ||
QUEUED = "queued" | ||
# Job manager believes the job is currently running. | ||
RUNNING = "running" | ||
# Job manager has finished and postprocessing ran successfully. | ||
COMPLETE = "complete" | ||
# Job was cancelled | ||
CANCELLED = "cancelled" | ||
# Problem submitting the job, interfacing with the job manager, | ||
# or postprocessing the job. | ||
FAILED = "failed" | ||
# DRM marked job as complete and job is being unstaged. | ||
POSTPROCESSING = "postprocessing" | ||
# Pulsar believed this job to be active but the job manager | ||
# cannot determine a state for it. | ||
LOST = "lost" | ||
|
||
|
||
def is_job_done(status): | ||
""" Does the supplied status correspond to a finished | ||
job (done processing). | ||
""" | ||
return status in [COMPLETE, CANCELLED, FAILED] | ||
return status in [COMPLETE, CANCELLED, FAILED, LOST] |
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
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