GearmanBundle icon indicating copy to clipboard operation
GearmanBundle copied to clipboard

Worker definition from bundle configuration

Open mmoreram opened this issue 9 years ago • 4 comments

Workers should be defined from the bundle config, using yml, xml and php. We could define them using local workers, with same info as in annotations, and we could define foreign workers, with just the queue name.

This feature is an extension of #107 and requires:

  • Bundle config definition and validation
  • Modifications ( and maybe some kind of refactoring ) in cache build.
  • Documentation
  • Tests

mmoreram avatar Jul 03 '14 16:07 mmoreram

I have set the Version 2.5.0 Milestone date to July the 19th, to ensure all new features have great quality :)

mmoreram avatar Jul 03 '14 16:07 mmoreram

I would be nicer at least to use a compiler pass so we can tag the services as workers opposed to referencing the service names on the annotations.

tags:
    - { name: gearman.worker }

However unless the remaining configuration stays in the annotations, it would still be better in the config. It should be easy enough to use the same method as controllers where annotations or resource files can define the full configuration. Then you need only create the service with its class.

orolyn avatar Jul 07 '14 09:07 orolyn

How about this issue? Anything changed?

er1z avatar Oct 05 '15 14:10 er1z

tagging wil introduce some kind of registry, which means you will be able to add workers in other ways to.

Ex: We are working with a commandbus. A middleware sends the command to gearman. But we want to be in control which worker can handle which commands/jobs

cjprinse avatar Oct 17 '18 07:10 cjprinse