/**
  * @param kObjectAddedEventConsumer $consumer
  * @return bool true if should continue to the next consumer
  */
 protected function doConsume(KalturaEventConsumer $consumer)
 {
     if (!$consumer->shouldConsumeAddedEvent($this->object)) {
         return true;
     }
     $additionalLog = '';
     if (method_exists($this->object, 'getId')) {
         $additionalLog .= 'id [' . $this->object->getId() . ']';
     }
     KalturaLog::debug(get_class($this) . ' event consumed by ' . get_class($consumer) . ' object type [' . get_class($this->object) . '] ' . $additionalLog);
     return $consumer->objectAdded($this->object, $this->raisedJob);
 }
示例#2
0
 /**
  * @param kObjectAddedEventConsumer $consumer
  * @return bool true if should continue to the next consumer
  */
 protected function doConsume(KalturaEventConsumer $consumer)
 {
     if (!$consumer->shouldConsumeAddedEvent($this->object)) {
         return true;
     }
     $additionalLog = '';
     if (method_exists($this->object, 'getId')) {
         $additionalLog .= 'id [' . $this->object->getId() . ']';
     }
     KalturaLog::debug('consumer [' . get_class($consumer) . '] started handling [' . get_class($this) . '] object type [' . get_class($this->object) . '] ' . $additionalLog);
     $result = $consumer->objectAdded($this->object, $this->raisedJob);
     KalturaLog::debug('consumer [' . get_class($consumer) . '] finished handling [' . get_class($this) . '] object type [' . get_class($this->object) . '] ' . $additionalLog);
     return $result;
 }