Skip to content

Create a standalone run function #459

Description

@GCBallesteros

Is your feature request related to a problem? Please describe.
Running pgqueuer programatically, not from the CLI, is a bit inconvenient. It seems like the officially vetted version is to use the pgq run which is a typer CLI. To create our own CLI's around pgqueuer we have to wrap around this function and keep typer around so that the initialization of default parameters is correctly understood. It would be preferable to have a non-decorated run function and have cli.py wrap around it with typer. This exposes a clean entrypoint into pgqueuer.

Describe the solution you'd like
See above

Describe alternatives you've considered

  1. Make my own version of the run function described above by copy/pasting the code inside cli.py:run
  2. Just use typer

Additional context
See https://gist.github.com/GCBallesteros/f8c14c6dbb96601be6f0a37704356329 for an implementation of option 2.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions