Name | django-command-queue JSON |
Version | 1.0.1 JSON |
download | |
home_page | |
Summary | Django command queue worker |
upload_time | 2023-10-10 08:51:25 |
maintainer | |
docs_url | None |
author | |
requires_python | |
license | |
keywords | django postgres |
VCS | |
bugtrack_url | |
requirements | No requirements were recorded. |
Travis-CI | No Travis. |
coveralls test coverage | No coveralls. |
### Installation ```bash $ pip install django-command-queue ``` #### `settings.py` ```python INSTALLED_APPS+=['django_command_queue'] ``` optional name|default|description -|-|- `COMMAND_WORKER_SLEEP`|`0.1`|`command_queue_worker` sleep interval `COMMAND_WORKER_RESTART`|`None`|`command_queue_worker` restart interval #### `migrate` ```bash $ python manage.py migrate ``` #### Models/tables model|db_table|fields/columns -|-|- `Queue`|`django_command_queue`|`id`,`name` ### Features + customizable with `command_queue_sleep.py` ### Examples queue worker/Docker `entrypoint` ```bash python manage.py command_queue_worker ``` `command_queue_sleep.py` - worker sleep customization ``` import time from django.core.management.base import BaseCommand from django_command_queue.models import Queue class Command(BaseCommand): def handle(self,*args,**options): time.sleep(0.42) if todo: Queue(name='command_name1').save() Queue(name='command_name2').save() ``` queue processing without worker/endless loop ```bash python manage.py command_queue ```
{ "_id": null, "home_page": "", "name": "django-command-queue", "maintainer": "", "docs_url": null, "requires_python": "", "maintainer_email": "", "keywords": "django,postgres", "author": "", "author_email": "", "download_url": "https://files.pythonhosted.org/packages/9f/9a/7542eb13ad624c21177df530b128d0f02925402cdfe1bdd618e29807a383/django-command-queue-1.0.1.tar.gz", "platform": null, "description": "### Installation\n```bash\n$ pip install django-command-queue\n```\n\n#### `settings.py`\n```python\nINSTALLED_APPS+=['django_command_queue']\n```\n\noptional\nname|default|description\n-|-|-\n`COMMAND_WORKER_SLEEP`|`0.1`|`command_queue_worker` sleep interval\n`COMMAND_WORKER_RESTART`|`None`|`command_queue_worker` restart interval\n\n#### `migrate`\n```bash\n$ python manage.py migrate\n```\n\n#### Models/tables\nmodel|db_table|fields/columns\n-|-|-\n`Queue`|`django_command_queue`|`id`,`name`\n### Features\n+ customizable with `command_queue_sleep.py`\n\n### Examples\nqueue worker/Docker `entrypoint`\n```bash\npython manage.py command_queue_worker\n```\n\n`command_queue_sleep.py` - worker sleep customization\n```\nimport time\nfrom django.core.management.base import BaseCommand\nfrom django_command_queue.models import Queue\n\nclass Command(BaseCommand):\n def handle(self,*args,**options):\n time.sleep(0.42)\n if todo:\n Queue(name='command_name1').save()\n Queue(name='command_name2').save()\n```\n\nqueue processing without worker/endless loop\n```bash\npython manage.py command_queue\n```\n\n", "bugtrack_url": null, "license": "", "summary": "Django command queue worker", "version": "1.0.1", "project_urls": null, "split_keywords": [ "django", "postgres" ], "urls": [ { "comment_text": "", "digests": { "blake2b_256": "9f9a7542eb13ad624c21177df530b128d0f02925402cdfe1bdd618e29807a383", "md5": "ef702a699b5ed5904b705d18ceffc1d8", "sha256": "77d58cdd23cbcc8276ad16506f6e258ff8cbae56f0bf82b0030d327913343556" }, "downloads": -1, "filename": "django-command-queue-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ef702a699b5ed5904b705d18ceffc1d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2787, "upload_time": "2023-10-10T08:51:25", "upload_time_iso_8601": "2023-10-10T08:51:25.544236Z", "url": "https://files.pythonhosted.org/packages/9f/9a/7542eb13ad624c21177df530b128d0f02925402cdfe1bdd618e29807a383/django-command-queue-1.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "upload_time": "2023-10-10 08:51:25", "github": false, "gitlab": false, "bitbucket": false, "codeberg": false, "lcname": "django-command-queue" }