Parcourir la source

Added GearmanTask to GearmanClientCallbackExceptionEvent.

The ::setExceptionCallback provides the GearmanTask to the function.
This was tested with PECL Gearman 1.1.2

Successfully tested with the event:
gearman.client.callback.exception
orolin il y a 11 ans
Parent
commit
608924c22c

+ 2 - 2
Dispatcher/GearmanCallbacksDispatcher.php

@@ -152,9 +152,9 @@ class GearmanCallbacksDispatcher extends AbstractGearmanDispatcher
      *
      * @see http://www.php.net/manual/en/gearmanclient.setexceptioncallback.php
      */
-    public function assignExceptionCallback()
+    public function assignExceptionCallback(GearmanTask $gearmanTask)
     {
-        $event = new GearmanClientCallbackExceptionEvent;
+        $event = new GearmanClientCallbackExceptionEvent($gearmanTask);
         $this->eventDispatcher->dispatch(
             GearmanEvents::GEARMAN_CLIENT_CALLBACK_EXCEPTION,
             $event

+ 2 - 2
Event/GearmanClientCallbackExceptionEvent.php

@@ -13,14 +13,14 @@
 
 namespace Mmoreram\GearmanBundle\Event;
 
-use Symfony\Component\EventDispatcher\Event;
+use Mmoreram\GearmanBundle\Event\Abstracts\AbstractGearmanClientTaskEvent;
 
 /**
  * GearmanClientCallbackExceptionEvent
  *
  * @since 2.3.1
  */
-class GearmanClientCallbackExceptionEvent extends Event
+class GearmanClientCallbackExceptionEvent extends AbstractGearmanClientTaskEvent
 {
 
 }