class job_repository extends abstract_repository implements job_repository_interface

internal  
 

Repository for the Job aggregate and its attempt log.

Constants

private TABLE

Methods

__construct(job_mapper $mapper, job_attempt_repository_interface|null $attempt_repository = null)

No description

create(job_dto $dto)

Persist a fresh job record.

save(job_interface $job)

Update a previously stored job.

void
add_attempt(int $jobid, job_attempt_interface $attempt)

Append an attempt to the governed job.

job_interface|null
find_by_id(int $id)

No description

job_interface|null
find_by_uuid(string $uuid)

No description

Details

at line 34
__construct(job_mapper $mapper, job_attempt_repository_interface|null $attempt_repository = null)

No description

Parameters

job_mapper $mapper
job_attempt_repository_interface|null $attempt_repository

at line 39
job_interface create(job_dto $dto)

Persist a fresh job record.

Parameters

job_dto $dto

Return Value

job_interface

Exceptions

dml_exception

at line 53
job_interface save(job_interface $job)

Update a previously stored job.

Parameters

job_interface $job

Return Value

job_interface

Exceptions

dml_exception

at line 65
void add_attempt(int $jobid, job_attempt_interface $attempt)

Append an attempt to the governed job.

Must keep middag_job.attempts and timing summary consistent.

Parameters

int $jobid
job_attempt_interface $attempt

Return Value

void

Exceptions

dml_exception

at line 70
job_interface|null find_by_id(int $id)

No description

Parameters

int $id

Return Value

job_interface|null

Exceptions

dml_exception

at line 82
job_interface|null find_by_uuid(string $uuid)

No description

Parameters

string $uuid

Return Value

job_interface|null

Exceptions

dml_exception