Symbiote\QueuedJobs\Services\QueuedJobService::grabMutex
Given a {@link QueuedJobDescriptor} mark the job as initialised. Works sort of like a mutex.
Currently a database lock isn't entirely achievable, due to database adapters not supporting locks. This may still have a race condition, but this should minimise the possibility. Side effect is the job status will be changed to "Initialised". Assumption is the job has a status of "Queued" or "Wait".
Signature
protected function grabMutex(QueuedJobDescriptor
$jobDescriptor )
Parameters
$jobDescriptor
— Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor
Returns
- bool