-
-
Notifications
You must be signed in to change notification settings - Fork 104
Add factories #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add factories #349
Conversation
| description="Subcommand to run scheduler", | ||
| ) | ||
| parser.add_argument("scheduler", help="Path to scheduler") | ||
| parser.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need two parameters. Specify only factory. We can check if the imported scheduler is a factory after we import it.
taskiq/abc/broker_factory.py
Outdated
| from taskiq.abc.broker import AsyncBroker | ||
|
|
||
|
|
||
| class BrokerFactory(ABC): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a class for that? Shouldn't just path to function be enough?
taskiq/cli/worker/args.py
Outdated
| parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter) | ||
| parser.add_argument( | ||
| "broker", | ||
| "--broker", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as for the scheduler.
taskiq/abc/scheduler_factory.py
Outdated
| from taskiq import TaskiqScheduler | ||
|
|
||
|
|
||
| class TaskiqSchedulerFactory(ABC): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question.
|
@s3rius fixed |
|
@s3rius can you merge this? |
* Add factories support --------- Co-authored-by: ddmytruk <dina.dmytruk23@gmail.com>
* Add factories support --------- Co-authored-by: ddmytruk <dina.dmytruk23@gmail.com>
No description provided.