public function markJobFailed($id, $message = null)
    {
        $entity = $this->get($id);
        $data = ['completed' => false, 'stats' => ['tries' => ($entity->stats['tries'] + 1), 'message' => $entity->stats['message'] . ($entity->stats['tries'] + 1) . '. ' . $message . PHP_EOL]];
        $this->patchEntity($entity, $data, ['validate' => false]);
        return $this->save($entity);
    }