Exemplo n.º 1
0
 /**
  * @return string
  */
 public function getStatus()
 {
     if ($this->isProcessing) {
         return 'processing';
     }
     if (!$this->event) {
         return null;
     }
     if ($this->event->getType() === StorageApiEvent::TYPE_SUCCESS || $this->event->getType() === StorageApiEvent::TYPE_INFO) {
         return StorageApiEvent::TYPE_SUCCESS;
     }
     return 'error';
 }
Exemplo n.º 2
0
 /**
  * @param StorageApiEvent $event
  * @return mixed|string Event ID
  */
 private function save(StorageApiEvent $event)
 {
     $event->setParams(array_merge($event->getParams(), array('jobId' => $this->job->getId(), 'orchestrationId' => $this->job->getOrchestrationId(), 'pid' => getmypid())));
     if ($event->getType() == StorageApiEvent::TYPE_ERROR) {
         $event->setParams(array_merge($event->getParams(), array('notificationEmails' => $this->job->getNotificationsEmails())));
     }
     return EventLogger::create($event, $this->client);
 }