original_string: private function updateTaskLog(WorkPackage $task, $log)
      {
          if ($this->databaseDisabled) {
              return;
          }
          $taskEntity = $task->getTaskEntity();
          if ($taskEntity instanceof Task) {
              $taskEntity->setLog($log);
              //make sure it is stored...
              $this->entityManager->flush($taskEntity);
          } else {
              throw new TaskQueueServiceException("Entity is not of type Task");
          }
      }
code: private function updateTaskLog(WorkPackage $task, $log)
      {
          if ($this->databaseDisabled) {
              return;
          }
          $taskEntity = $task->getTaskEntity();
          if ($taskEntity instanceof Task) {
              $taskEntity->setLog($log);
              //make sure it is stored...
              $this->entityManager->flush($taskEntity);
          } else {
              throw new TaskQueueServiceException("Entity is not of type Task");
          }
      }
code_tokens: private function updateTaskLog ( WorkPackage $ task , $ log ) { if ( $ this -> databaseDisabled ) { return ; } $ taskEntity = $ task -> getTaskEntity ( ) ; if ( $ taskEntity instanceof Task ) { $ taskEntity -> setLog ( $ log ) ; //make sure it is stored... $ this -> entityManager -> flush ( $ taskEntity ) ; } else { throw new TaskQueueServiceException ( "Entity is not of type Task" ) ; } }
docstring: Writes the log to the Task entity
  
  @param WorkPackage $task
  @param string      $log
  @return void
  @throws TaskQueueServiceException
docstring_tokens: Writes the log to the Task entity