Simple async worker
Project description
mod-ngarn
Usage
Usage: mod-ngarn [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
create-table Create mod-ngarn queue table
run Run mod-ngarn job
wait-for-notify Wait and listening for NOTIFY
Installation
pip install mod-ngarn
Run modngarn
Usage: mod-ngarn run [OPTIONS]
Options:
--queue-table TEXT Queue table name (Default: os.getenv("DBTABLE",
"public.modngarn_job"))
--limit INTEGER Limit jobs (Default: 300)
--max-delay FLOAT Max delay for failed jobs (seconds) (Default: None)
--help Show this message and exit.
Returns:
Exit code 0 Success run all <--limit> job
Exit code 3 Success run but has job less than <--limit>
Create modngarn job queue table
Usage: mod-ngarn create-table [OPTIONS]
Options:
--queue-table TEXT Queue table name (Default: os.getenv("DBTABLE",
"public.modngarn_job"))
--help Show this message and exit.
Wait for notify
Usage: mod-ngarn wait-for-notify [OPTIONS]
Wait and listening for NOTIFY
Options:
--queue-table TEXT Queue table name (Default: os.getenv("DBTABLE",
"public.modngarn_job"))
--help Show this message and exit.
Dev
Required
- pipenv (https://github.com/pypa/pipenv)
- running PostgreSQL (
psql
should work) - python 3.7
Setup
pipenv install --python 3.7
pipenv shell
Runtests
./runtests.sh
Publish to PyPi
flit publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mod_ngarn-3.1.tar.gz
(11.8 kB
view hashes)
Built Distribution
Close
Hashes for mod_ngarn-3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21263f15b109a841999a05b4e68c6692849d98494f901e76a7c10b041d94cab7 |
|
MD5 | cf6abb39a0d4a2ff4d0288ef8443ffae |
|
BLAKE2b-256 | 0cc522d9f5524b09b960411a673039c1fa62d1949b5d3f45ff4a996572a7cb7e |