taskiq-python / taskiq

Distributed task queue with full async support
MIT License
806 stars 50 forks source link

Add --factory command line parameter #292

Closed realitix closed 7 months ago

realitix commented 7 months ago

Hello, Currently, when starting a worker, we have to pass a broker instance directly in the CLI. It would be good to allow a factory function like with uvicorn.

Thanks

s3rius commented 7 months ago

Hi. I was thinking about this one. I can add it, but it actually makes no sense to me, since tasks have to be assigned to broker. If your broker is going to be created in the function, you won't be able to call a task function on it.

I would be interested in how are your going to use. Can you please share your thoughts?

realitix commented 7 months ago

Hello, at first I though it could be a good idea but indeed it's not. So you can ignore my issue. Sorry

s3rius commented 7 months ago

Thanks for the response and please don't be sorry. Any idea is valuable. Please share any ideas you have regarding the project.