Closed apinstein closed 10 years ago
JQManagedJob
[x] Exception when asked to manage a second job
[x] Resolve async to state
[x] Resolve async exception marks job failed when convert exceptions to failures is enabled
[x] Resolve async exception leaves in wait async by default
[x] Resolve async job does not exist throws exception
[x] Resolve async job uses mutex
[x] Resolve async job clears mutex on failure
[x] Resolve async job clears mutex on exception
@lorennorman woot
@lorennorman I added one more thing you need on your end; to detect if the job isn't in wait_async (happens if for some reason 2 webhooks ping us at the same time; first will "finish normally" and second will find an already completed job (well it's a race condition; it might find a compeleted one, a failed one, or a missing one).
JQManagedJob
[X] JQManagedJob::resolveWaitAsyncJob(): will throw JQManagedJob_InvalidStateException if job is STATUS_QUEUED
[X] JQManagedJob::resolveWaitAsyncJob(): will throw JQManagedJob_InvalidStateException if job is STATUS_RUNNING
[X] JQManagedJob::resolveWaitAsyncJob(): will run if job is STATUS_WAIT_ASYNC
[X] JQManagedJob::resolveWaitAsyncJob(): will throw JQManagedJob_InvalidStateException if job is STATUS_COMPLETED
[X] JQManagedJob::resolveWaitAsyncJob(): will throw JQManagedJob_InvalidStateException if job is STATUS_FAILED
@lorennorman I am pretty sure this is 100% done now unless you run across a problem.
....