Issues (219)

Manager/JobManagerInterface.php (2 issues)

1
<?php
2
3
namespace Dtc\QueueBundle\Manager;
4
5
use Dtc\QueueBundle\Model\Job;
6
7
interface JobManagerInterface
8
{
9
    public function resetExceptionJobs($workerName = null, $methodName = null);
10
11
    public function pruneExceptionJobs($workerName = null, $methodName = null);
12
13
    /**
14
     * Prunes (or archived) jobs that are expired.
15
     *
16
     * @return mixed
17
     */
18
    public function pruneExpiredJobs($workerName = null, $methodName = null);
19
20
    /**
21
     * Returns the number of "Waiting" jobs.
22
     *
23
     * @param null $workerName
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $workerName is correct as it would always require null to be passed?
Loading history...
24
     * @param null $methodName
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $methodName is correct as it would always require null to be passed?
Loading history...
25
     *
26
     * @return mixed
27
     */
28
    public function getWaitingJobCount($workerName = null, $methodName = null);
29
30
    public function getStatus(): array;
31
32
    public function getJob($workerName = null, $methodName = null, $prioritize = true, $runId = null);
33
34
    public function deleteJob(Job $job);
35
36
    public function save(Job $job);
37
38
    /**
39
     * Called after a job has finished - may delete the job / reset the job and/or do other related cleanup.
40
     */
41
    public function saveHistory(Job $job);
42
43
    /**
44
     * @return JobTimingManager
45
     */
46
    public function getJobTimingManager();
47
48
    public function getJobClass();
49
50
    /**
51
     * Removes archived jobs older than $olderThan.
52
     */
53
    public function pruneArchivedJobs(\DateTime $olderThan);
54
}
55