mmoreram / GearmanBundle

GearmanBundle for Symfony2
MIT License
236 stars 104 forks source link

Worker definition from bundle configuration #114

Open mmoreram opened 10 years ago

mmoreram commented 10 years ago

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:

mmoreram commented 10 years ago

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

orolyn commented 10 years ago

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.

er1z commented 9 years ago

How about this issue? Anything changed?

cjprinse commented 6 years ago

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