| @@ 106-115 (lines=10) @@ | ||
| 103 | protected function pushQueueCommands() { |
|
| 104 | ||
| 105 | $this->getSocket()->getCommands() |
|
| 106 | ->add('queue:add', function(Request $request, $daemon) { |
|
| 107 | $manager = new QueueManager( |
|
| 108 | $this->getConfiguration(), |
|
| 109 | $this->getLogger(), |
|
| 110 | $this->getEvents(), |
|
| 111 | $this->getEntityManager() |
|
| 112 | ); |
|
| 113 | ||
| 114 | return $manager->add($name, $request); |
|
| 115 | }) |
|
| 116 | ->add('queue:addBulk', function(array $requests, $daemon) { |
|
| 117 | ||
| 118 | $manager = new QueueManager( |
|
| @@ 116-127 (lines=12) @@ | ||
| 113 | ||
| 114 | return $manager->add($name, $request); |
|
| 115 | }) |
|
| 116 | ->add('queue:addBulk', function(array $requests, $daemon) { |
|
| 117 | ||
| 118 | $manager = new QueueManager( |
|
| 119 | $this->getConfiguration(), |
|
| 120 | $this->getLogger(), |
|
| 121 | $this->getEvents(), |
|
| 122 | $this->getEntityManager() |
|
| 123 | ); |
|
| 124 | ||
| 125 | return $manager->addBulk($requests); |
|
| 126 | ||
| 127 | }); |
|
| 128 | ||
| 129 | } |
|
| 130 | ||