Filtering queue results
The queue() method takes an filter argument. The system uses enum internal to represent filtering, but because PHP lacks a native enum type these can't be used i.e. with the SOAP service.
This page lists the possible values for the sort argument with descriptions for their values. Use none for no filtering at all.
An job is in either one of three phases. The first one is pending, the seconds is running and the third is finished. These enums filter on phase:
- pending: Job is queued, but not yet started.
- running: Job is running, but not yet finished.
- finished: Job has finished (includes all states).
While running the job can have been transitioned to either one of these states:
- suspend: Job is suspended.
- resumed: Job is resumed.
- continued: Waiting for sub job to complete.
The finished job can have these states that can be filtered on:
- success: Finished successful.
- warning: Finished with warnings.
- error: Finished with errors.
- crashed: The job has crashed (i.e. segmentation fault).
These values filter on pseudo states:
- completed: Finished with success or warnings.
- recent: Include recently finished or ongoing jobs.
In reality, the interesting filter options are pending, running and completed.