mikaelkael /
GearmanBundle
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Gearman Bundle for Symfony2 |
||
| 5 | * |
||
| 6 | * For the full copyright and license information, please view the LICENSE |
||
| 7 | * file that was distributed with this source code. |
||
| 8 | * |
||
| 9 | * Feel free to edit as you please, and have fun. |
||
| 10 | * |
||
| 11 | * @author Marc Morera <[email protected]> |
||
| 12 | */ |
||
| 13 | |||
| 14 | namespace Mmoreram\GearmanBundle; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Events dispatched by GearmanBundle |
||
| 18 | * |
||
| 19 | * @since 2.3.1 |
||
| 20 | */ |
||
| 21 | class GearmanEvents |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * Sets the callback function to be used when a task is completed |
||
| 25 | * |
||
| 26 | * event.name : gearman.client.callback.complete |
||
| 27 | * event.class : GearmanClientCallbackCompleteEvent |
||
| 28 | * |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | const GEARMAN_CLIENT_CALLBACK_COMPLETE = 'gearman.client.callback.complete'; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Sets the callback function to be used when a task does not complete |
||
| 35 | * successfully |
||
| 36 | * |
||
| 37 | * event.name : gearman.client.callback.fail |
||
| 38 | * event.class : GearmanClientCallbackFailEvent |
||
| 39 | * |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | const GEARMAN_CLIENT_CALLBACK_FAIL = 'gearman.client.callback.fail'; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Sets the callback function for accepting data packets for a task |
||
| 46 | * |
||
| 47 | * event.name : gearman.client.callback.data |
||
| 48 | * event.class : GearmanClientCallbackDataEvent |
||
| 49 | * |
||
| 50 | * @var string |
||
| 51 | */ |
||
| 52 | const GEARMAN_CLIENT_CALLBACK_DATA = 'gearman.client.callback.data'; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Sets a function to be called when a task is received and queued by the |
||
| 56 | * Gearman job server |
||
| 57 | * |
||
| 58 | * event.name : gearman.client.callback.created |
||
| 59 | * event.class : GearmanClientCallbackCreatedEvent |
||
| 60 | * |
||
| 61 | * @var string |
||
| 62 | */ |
||
| 63 | const GEARMAN_CLIENT_CALLBACK_CREATED = 'gearman.client.callback.created'; |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Specifies a function to call when a worker for a task sends an exception |
||
| 67 | * |
||
| 68 | * event.name : gearman.client.callback.exception |
||
| 69 | * event.class : GearmanClientCallbackExceptionEvent |
||
| 70 | * |
||
| 71 | * @var string |
||
| 72 | */ |
||
| 73 | const GEARMAN_CLIENT_CALLBACK_EXCEPTION = 'gearman.client.callback.exception'; |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Sets a callback function used for getting updated status information from |
||
| 77 | * a worker |
||
| 78 | * |
||
| 79 | * event.name : gearman.client.callback.status |
||
| 80 | * event.class : GearmanClientCallbackStatusEvent |
||
| 81 | * |
||
| 82 | * @var string |
||
| 83 | */ |
||
| 84 | const GEARMAN_CLIENT_CALLBACK_STATUS = 'gearman.client.callback.status'; |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Sets a function to be called when a worker sends a warning |
||
| 88 | * |
||
| 89 | * event.name : gearman.client.callback.warning |
||
| 90 | * event.class : GearmanClientCallbackWarningEvent |
||
| 91 | * |
||
| 92 | * @var string |
||
| 93 | */ |
||
| 94 | const GEARMAN_CLIENT_CALLBACK_WARNING = 'gearman.client.callback.warning'; |
||
| 95 | |||
| 96 | /** |
||
| 97 | * Sets a function to be called when a worker needs to send back data prior |
||
| 98 | * to job completion. |
||
| 99 | * |
||
| 100 | * A worker can do this when it needs to send updates, send partial results, |
||
| 101 | * or flush data during long running jobs |
||
| 102 | * |
||
| 103 | * event.name : gearman.client.callback.workload |
||
| 104 | * event.class : GearmanClientCallbackWorkloadEvent |
||
| 105 | * |
||
| 106 | * @var string |
||
| 107 | */ |
||
| 108 | const GEARMAN_CLIENT_CALLBACK_WORKLOAD = 'gearman.client.callback.workload'; |
||
| 109 | |||
| 110 | /** |
||
| 111 | * Sets a function to be called when a worker has completed a job. |
||
| 112 | * |
||
| 113 | * This will be fired by the worker after completion of a job before preparing to start another work cycle. |
||
| 114 | * |
||
| 115 | * @var string |
||
| 116 | */ |
||
| 117 | const GEARMAN_WORK_EXECUTED = 'gearman.work.executed'; |
||
| 118 | |||
| 119 | /** |
||
| 120 | * Sets a function to be called when a worker is starting a job. |
||
| 121 | * |
||
| 122 | * This will be fired when the worker start another work cycle. |
||
| 123 | * |
||
| 124 | * @var string |
||
| 125 | */ |
||
| 126 | const GEARMAN_WORK_STARTING = 'gearman.work.starting'; |
||
| 127 | } |
||
|
0 ignored issues
–
show
|
|||
| 128 |
This check marks files that end in a newline character, i.e. an empy line.