FailedJob.php 924 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace think\queue;
  3. abstract class FailedJob
  4. {
  5. /**
  6. * Log a failed job into storage.
  7. *
  8. * @param string $connection
  9. * @param string $queue
  10. * @param string $payload
  11. * @param \Exception $exception
  12. * @return int|null
  13. */
  14. abstract public function log($connection, $queue, $payload, $exception);
  15. /**
  16. * Get a list of all of the failed jobs.
  17. *
  18. * @return array
  19. */
  20. abstract public function all();
  21. /**
  22. * Get a single failed job.
  23. *
  24. * @param mixed $id
  25. * @return object|null
  26. */
  27. abstract public function find($id);
  28. /**
  29. * Delete a single failed job from storage.
  30. *
  31. * @param mixed $id
  32. * @return bool
  33. */
  34. abstract public function forget($id);
  35. /**
  36. * Flush all of the failed jobs from storage.
  37. *
  38. * @return void
  39. */
  40. abstract public function flush();
  41. }