-
Notifications
You must be signed in to change notification settings - Fork 104
/
GearmanEvents.php
111 lines (100 loc) · 3.29 KB
/
GearmanEvents.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
namespace Mmoreram\GearmanBundle;
class GearmanEvents
{
/**
* Sets the callback function to be used when a task is completed
*
* event.name : gearman.client.callback.complete
* event.class : GearmanClientCallbackCompleteEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_COMPLETE = 'gearman.client.callback.complete';
/**
* Sets the callback function to be used when a task does not complete
* successfully
*
* event.name : gearman.client.callback.fail
* event.class : GearmanClientCallbackFailEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_FAIL = 'gearman.client.callback.fail';
/**
* Sets the callback function for accepting data packets for a task
*
* event.name : gearman.client.callback.data
* event.class : GearmanClientCallbackDataEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_DATA = 'gearman.client.callback.data';
/**
* Sets a function to be called when a task is received and queued by the
* Gearman job server
*
* event.name : gearman.client.callback.created
* event.class : GearmanClientCallbackCreatedEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_CREATED = 'gearman.client.callback.created';
/**
* Specifies a function to call when a worker for a task sends an exception
*
* event.name : gearman.client.callback.exception
* event.class : GearmanClientCallbackExceptionEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_EXCEPTION = 'gearman.client.callback.exception';
/**
* Sets a callback function used for getting updated status information from
* a worker
*
* event.name : gearman.client.callback.status
* event.class : GearmanClientCallbackStatusEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_STATUS = 'gearman.client.callback.status';
/**
* Sets a function to be called when a worker sends a warning
*
* event.name : gearman.client.callback.warning
* event.class : GearmanClientCallbackWarningEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_WARNING = 'gearman.client.callback.warning';
/**
* Sets a function to be called when a worker needs to send back data prior
* to job completion.
*
* A worker can do this when it needs to send updates, send partial results,
* or flush data during long running jobs
*
* event.name : gearman.client.callback.workload
* event.class : GearmanClientCallbackWorkloadEvent
*
* @var string
*/
public const GEARMAN_CLIENT_CALLBACK_WORKLOAD = 'gearman.client.callback.workload';
/**
* Sets a function to be called when a worker has completed a job.
*
* This will be fired by the worker after completion of a job before preparing to start another work cycle.
*
* @var string
*/
public const GEARMAN_WORK_EXECUTED = 'gearman.work.executed';
/**
* Sets a function to be called when a worker is starting a job.
*
* This will be fired when the worker start another work cycle.
*
* @var string
*/
public const GEARMAN_WORK_STARTING = 'gearman.work.starting';
}