Work.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * Gearman Bundle for Symfony2
  4. *
  5. * @author Marc Morera <yuhu@mmoreram.com>
  6. * @since 2013
  7. */
  8. namespace Mmoreram\GearmanBundle\Driver\Gearman;
  9. use Doctrine\Common\Annotations\Annotation;
  10. /**
  11. * Gearman Work annotation driver
  12. *
  13. * @Annotation
  14. */
  15. class Work extends Annotation
  16. {
  17. /**
  18. * Name of worker
  19. *
  20. * @var integer
  21. */
  22. public $name = null;
  23. /**
  24. * Description of Worker
  25. *
  26. * @var string
  27. */
  28. public $description = null;
  29. /**
  30. * Number of iterations specified for all jobs inside Work
  31. *
  32. * @var integer
  33. */
  34. public $iterations = null;
  35. /**
  36. * Servers assigned for all jobs of this work to be executed
  37. *
  38. * @var mixed
  39. */
  40. public $servers = null;
  41. /**
  42. * Default method to call for all jobs inside this work
  43. *
  44. * @var string
  45. */
  46. public $defaultMethod = null;
  47. /**
  48. * Service typeof Class. If it's defined, object will be instanced throught service dependence injection.
  49. * Otherwise, class will be instance with new() method
  50. *
  51. * @var string
  52. */
  53. public $service = null;
  54. }