QueueInterface.php

  1. 8.0.x lib/Drush/Queue/QueueInterface.php
  2. 7.x lib/Drush/Queue/QueueInterface.php
  3. master lib/Drush/Queue/QueueInterface.php

Namespace

Drush\Queue

Interfaces

Namesort descending Description
QueueInterface Defines an interface for interacting with queues.

File

lib/Drush/Queue/QueueInterface.php
View source
  1. <?php
  2. namespace Drush\Queue;
  3. /**
  4. * Defines an interface for interacting with queues.
  5. */
  6. interface QueueInterface {
  7. /**
  8. * Returns all queues.
  9. */
  10. public function getQueues();
  11. /**
  12. * Runs a given queue.
  13. *
  14. * @param string $name
  15. * The name of the queue to run.
  16. * @param int $time_limit
  17. * The maximum number of seconds that the queue can run. By default the
  18. * queue will be run as long as possible.
  19. *
  20. * @return int
  21. * The number of items successfully processed from the queue.
  22. */
  23. public function run($name, $time_limit = 0);
  24. /**
  25. * Returns a given queue definition.
  26. *
  27. * @param string $name
  28. * The name of the queue to run.
  29. */
  30. public function getQueue($name);
  31. /**
  32. * Returns a given queue definition.
  33. *
  34. * @param string $name
  35. * The name of the queue to run.
  36. */
  37. public function getInfo($name);
  38. }