{ "info": { "author": "Ahmed El-Sayed", "author_email": "ahmed.m.elsayed93@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# TasKue\nMulti stages task queue uses [Redis](https://redis.io) as a backend.\n\n## Features\n- Multi stages.\n- Retry on fail for a defined number of retires.\n- Capture task logs.\n- Task can be taged with label so it will run only on runners that has the same tag. \n- Skip task if any task of the previous stages failed.\n\n## Installation\n```bash\npip install taskue\n```\n\n## Getting started\n\n#### Start a runner\n```bash\ntaskue runner start --redis-host --redis-port <6379>\n```\nMore options: \n- `tags`: Runner tags, taged tasks will run only on runners which has its tag\n- `timeout`: Runner timeout, task timeout overwrites it (default 1 hour)\n- `run_untaged_tasks`: Allow runner to run untaged tasks (enabled by default).\n- `path`: add the path of a module to include.\n\n\n#### How it works\n\n```python\nfrom redis import Redis\nfrom taskue import Taskue, Task \n\ntskue = Taskue(Redis())\n\n# define tasks\nt1 = Task() \nt1.execute(print, \"Hello from task 1\") \nt1.retries = 3 # retry up to 3 times on failure \n\nt2 = Task()\nt2.timeout = 5 # set task timeout to 5\nt2.execute(print, \"Hello from task 2\") \n\nt3 = Task()\nt3.skip_on_failure = True # skip this task if any task of the previous stage failed\nt3.execute(print, \"Hello from task 3\") \n``` \n\nExecute single task\n```python\n# execute single task\ntask_uid = tskue.run(t1)\n```\n\nor execute multiple tasks as a workflow\n```python\n\n# run task t1 and task t2 in stage 1 and task t3 in stage 2\nworkflow_uid = tskue.run_workflow([[t1, t2], [t3]])\n```\n\n> Hint: All the tasks in the same stage run in parallel, and each stage starts when the previous stage finish.\n\n## CLI\n```bash\ntaskue --help\nUsage: cli.py [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --redis-host TEXT redis hostname\n --redis-port INTEGER redis port\n --help Show this message and exit.\n\nCommands:\n runner\n task\n workflow\n```\n\n### commands\n- `runner`:\n - `start`: start new runner\n- `task`:\n - `list`: list all tasks\n - `get`: get task info using its uid\n - `logs` get task logs\n - `delete` delete task\n- `workflow`\n - `list`: list all workflows\n - `get`: get workflow info using its uid\n - `logs` get workflow logs\n - `delete` delete workflow\n\n## To Do\n- [ ] Detect dead runner and reschedule its task.\n- [ ] Add more docs and examples\n- [ ] Add tests\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ahmedelsayed-93/taskue", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "taskue", "package_url": "https://pypi.org/project/taskue/", "platform": "", "project_url": "https://pypi.org/project/taskue/", "project_urls": { "Homepage": "https://github.com/ahmedelsayed-93/taskue" }, "release_url": "https://pypi.org/project/taskue/0.3/", "requires_dist": null, "requires_python": "", "summary": "Multi stages task queue", "version": "0.3" }, "last_serial": 5579986, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "07197fce8cef292cb97990efcb774682", "sha256": "c7d446d20ed2c8ca9f79da6162e91c8c5ea72fa4f5dd9dd09f5517a19d91f335" }, "downloads": -1, "filename": "taskue-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "07197fce8cef292cb97990efcb774682", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9429, "upload_time": "2019-07-16T21:26:37", "url": "https://files.pythonhosted.org/packages/12/2f/3a1482153a560db07decd1593d7523e30aaedd282e4454176f6021e5079d/taskue-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a78fe89ba90551c0e7c7385538239da", "sha256": "a553b2b3ed4b8df74b0762c5ff7703e7d8d3390e46aaa7595631e0c062c1727a" }, "downloads": -1, "filename": "taskue-0.1.tar.gz", "has_sig": false, "md5_digest": "8a78fe89ba90551c0e7c7385538239da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7145, "upload_time": "2019-07-16T21:26:40", "url": "https://files.pythonhosted.org/packages/39/a8/1a94d22f549714c33779142494a1d99cbb2286870f89cd1f24bc867c8200/taskue-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "dd929cfd179ae1d649139752b0392521", "sha256": "91fc7fba33cab25d4e83f19c46571a9717eb4093f6e01370a63b888b46be30bb" }, "downloads": -1, "filename": "taskue-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "dd929cfd179ae1d649139752b0392521", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9501, "upload_time": "2019-07-17T10:56:36", "url": "https://files.pythonhosted.org/packages/5c/fc/d173b89f5d42dc2d595d0cffca93e51db6a3316981e77588f340decb35f1/taskue-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a23920772a236d06568a70f707c4e23", "sha256": "43e0db57f16ce8be2952c6d785c95c22ecb5bcba69f98586ac8ce0c5d3216870" }, "downloads": -1, "filename": "taskue-0.2.tar.gz", "has_sig": false, "md5_digest": "0a23920772a236d06568a70f707c4e23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7021, "upload_time": "2019-07-17T10:56:38", "url": "https://files.pythonhosted.org/packages/f3/20/5b59ccee29ee90e5756a6b77def95a7028c3f8c0937071866132c17f3022/taskue-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "9f3bc7f2f3e27f60a266c13bffee9d9e", "sha256": "d5e1013aa93f8d21505b38739e77c56fe445eea61e8fc541dc2d7516ac0f454e" }, "downloads": -1, "filename": "taskue-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "9f3bc7f2f3e27f60a266c13bffee9d9e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10055, "upload_time": "2019-07-24T21:51:09", "url": "https://files.pythonhosted.org/packages/ba/4d/b396b863444ab18c32c90a5e8020164d9d09742b36115f87404ce75d10e6/taskue-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c74271fe2f27077a59077e851600564", "sha256": "51b790c84ebd0aa98473a1018462761501703747077898897b8dab39b81b9431" }, "downloads": -1, "filename": "taskue-0.3.tar.gz", "has_sig": false, "md5_digest": "9c74271fe2f27077a59077e851600564", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7854, "upload_time": "2019-07-24T21:51:10", "url": "https://files.pythonhosted.org/packages/b6/14/4174f5be79a5e52319b7ef1ad87a21731997d138764e7cabe4678f713ba2/taskue-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f3bc7f2f3e27f60a266c13bffee9d9e", "sha256": "d5e1013aa93f8d21505b38739e77c56fe445eea61e8fc541dc2d7516ac0f454e" }, "downloads": -1, "filename": "taskue-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "9f3bc7f2f3e27f60a266c13bffee9d9e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10055, "upload_time": "2019-07-24T21:51:09", "url": "https://files.pythonhosted.org/packages/ba/4d/b396b863444ab18c32c90a5e8020164d9d09742b36115f87404ce75d10e6/taskue-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9c74271fe2f27077a59077e851600564", "sha256": "51b790c84ebd0aa98473a1018462761501703747077898897b8dab39b81b9431" }, "downloads": -1, "filename": "taskue-0.3.tar.gz", "has_sig": false, "md5_digest": "9c74271fe2f27077a59077e851600564", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7854, "upload_time": "2019-07-24T21:51:10", "url": "https://files.pythonhosted.org/packages/b6/14/4174f5be79a5e52319b7ef1ad87a21731997d138764e7cabe4678f713ba2/taskue-0.3.tar.gz" } ] }