StandaloneJobWriteService
in package
implements
JobWriteServiceInterface
Standalone job write service using Laravel Query Builder only.
Clean implementation without Propel references or class_exists checks. Handles the AtoM entity inheritance chain: object -> job.
Table of Contents
Interfaces
- JobWriteServiceInterface
- Contract for job write operations.
Methods
- createJob() : int
- Create a new job record.
- updateJobStatus() : void
- Update the status of an existing job.
Methods
createJob()
Create a new job record.
public
createJob(array<string|int, mixed> $data) : int
Parameters
- $data : array<string|int, mixed>
-
Job data including:
- name (string) job class name
- user_id (int) user who created the job
- status_id (int) QubitTerm status ID
- object_id (int|null) related object ID
- download_path (string|null)
- output (string|null)
Return values
int —The new job ID
updateJobStatus()
Update the status of an existing job.
public
updateJobStatus(int $jobId, int $statusId) : void
Parameters
- $jobId : int
-
The job ID
- $statusId : int
-
QubitTerm status ID (e.g., JOB_STATUS_COMPLETED_ID)