| @@ 121-130 (lines=10) @@ | ||
| 118 | protected function pushQueueCommands() { |
|
| 119 | ||
| 120 | $this->getSocket()->getCommands() |
|
| 121 | ->add('queue:add', function(Request $request, $daemon) { |
|
| 122 | $manager = new QueueManager( |
|
| 123 | $this->getConfiguration(), |
|
| 124 | $this->getLogger(), |
|
| 125 | $this->getEvents(), |
|
| 126 | $this->getEntityManager() |
|
| 127 | ); |
|
| 128 | ||
| 129 | return $manager->add($name, $request); |
|
| 130 | }) |
|
| 131 | ->add('queue:addBulk', function(array $requests, $daemon) { |
|
| 132 | ||
| 133 | $manager = new QueueManager( |
|
| @@ 131-142 (lines=12) @@ | ||
| 128 | ||
| 129 | return $manager->add($name, $request); |
|
| 130 | }) |
|
| 131 | ->add('queue:addBulk', function(array $requests, $daemon) { |
|
| 132 | ||
| 133 | $manager = new QueueManager( |
|
| 134 | $this->getConfiguration(), |
|
| 135 | $this->getLogger(), |
|
| 136 | $this->getEvents(), |
|
| 137 | $this->getEntityManager() |
|
| 138 | ); |
|
| 139 | ||
| 140 | return $manager->addBulk($requests); |
|
| 141 | ||
| 142 | }); |
|
| 143 | ||
| 144 | } |
|
| 145 | ||