Skip to content

Conversation

@dima-dmytruk23
Copy link
Contributor

No description provided.

description="Subcommand to run scheduler",
)
parser.add_argument("scheduler", help="Path to scheduler")
parser.add_argument(
Copy link
Member

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.

from taskiq.abc.broker import AsyncBroker


class BrokerFactory(ABC):
Copy link
Member

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?

parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument(
"broker",
"--broker",
Copy link
Member

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.

from taskiq import TaskiqScheduler


class TaskiqSchedulerFactory(ABC):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question.

@dima-dmytruk23 dima-dmytruk23 marked this pull request as draft August 18, 2024 14:08
@dima-dmytruk23 dima-dmytruk23 marked this pull request as ready for review August 18, 2024 14:56
@dima-dmytruk23
Copy link
Contributor Author

@s3rius fixed

@Molandrious
Copy link

@s3rius can you merge this?

s3rius
s3rius previously approved these changes Mar 24, 2025
@s3rius s3rius changed the base branch from develop to master March 24, 2025 21:54
@s3rius s3rius dismissed their stale review March 24, 2025 21:54

The base branch was changed.

@s3rius s3rius merged commit 68a7577 into taskiq-python:master Mar 24, 2025
s3rius pushed a commit that referenced this pull request Apr 4, 2025
* Add factories support

---------

Co-authored-by: ddmytruk <dina.dmytruk23@gmail.com>
s3rius pushed a commit that referenced this pull request Apr 4, 2025
* Add factories support

---------

Co-authored-by: ddmytruk <dina.dmytruk23@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants