Skip to content

Add db schema support via kwargs #40

@Dimaz55

Description

@Dimaz55

Is your feature request related to a problem?

Now init looks ugly:

broker = AsyncpgBroker(
    dsn=f"{settings.db.dsn}?search_path={settings.db.schema}",
).with_result_backend(
    AsyncpgResultBackend(
        dsn=f"{settings.db.dsn}?search_path={settings.db.schema}",
    )
)

Describe the solution you'd like

I wish it look like this:

broker = AsyncpgBroker(
    dsn=settings.db.dsn,
    schema=settings.db.schema,
).with_result_backend(
    AsyncpgResultBackend(
        dsn=settings.db.dsn,
        schema=settings.db.schema,
    )
)

Describe alternatives you've considered

No response

Which component would this affect?

Other

Use case

Multi-schema DB usage

Additional context

No response

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions