{ "info": { "author": "BoyleGu", "author_email": "gubaoer@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries" ], "description": "celery-task-tigger\n====\n\n[![release](https://img.shields.io/badge/release-0.3-blue.svg)]()\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)]()\n[![celery](https://img.shields.io/badge/celery-3%7C4-brightgreen.svg)]()\n\n\nA controllable timing task widgets with Celery\n\n## About\n\nAs is known to all, Celery have a already provides periodic task and it's very perfit. But, Assume this case: After my task was called, I hope it's task can frequency of execution, and when celery task was started. \n\nThe above case, Periodic task is hard to practice, Becacuse it's depend on celery beat. ``celery-task-tigger`` do it over simple packaging or implement for solution to do it.\n\n\n## Installation\n\n~~~python\npip install celery-task-tigger\n\n~~~\n\n## Useage\n\nAssume you have aleady install celery and can do it.\n\n### Bases\n\nOption `max_times` is must be appoint.\n\n~~~python\nfrom celery_tasktigger.decorator import tigger_task\n\n@app.task(bind=True)\n@tigger_task(max_times='forever') # forever is expressed unlimited time\ndef add(self, x, y):\n return x + y\n\n~~~\n\n### max_times\n\nOption `max_times`: The maximum number of execute the task times.\n\nType\uff1a ***int***\n\n> Note: The value ***'forever'*** is expressed unlimited time. \n\nExample: \n\n~~~python\n@app.task(bind=True)\n@tigger_task(max_times=3) # after execute 3 times, raise an exception\ndef add(self, x, y):\n return x + y\n\n~~~\n\n### countdown\n\nOption `countdown`: You can also provide the countdown argument to execute.\n\nType: ***int***\n\nDefault: 1 (seconds)\n\nExample: \n\n~~~python\n@app.task(bind=True)\n@tigger_task(max_times='forever', countdown=3) # each execute in 3 seconds\ndef add(self, x, y):\n return x + y\n\n~~~\n\n## How To Calling Task\n\n~~~~python\n>> from example import add\n>> add.apply_async((1,2))\n~~~~\n\nyou can also delayed execute task, as follow\uff1a\n\n~~~~python\n>> from example import add\n>> add.apply_async((1,2), countdown=4) # after 4 seconds, begin start task\n~~~~\n\n> About Celery Task, Please see below for details\uff1a \n> [Celery Calling-Tasks Document](http://docs.jinkan.org/docs/celery/userguide/calling.html)\n\n## How To Stop\n\nif you appoint `max_times='forever'` or provides the bigger values of max_times, you must stop it in programe.\n\n~~~~python\n>> result = add.apply_async((1,2))\n>> result.revoke()\n or\n>> from mycelery import app\n>> app.control.revoke('task_id')\n~~~~\n\n> See below for details\uff1a \n> [Celery Document\u2014\u2014FAQ](http://docs.jinkan.org/docs/celery/faq.html#can-i-cancel-the-execution-of-a-task)\n\n## Some screenshots\n\n![](http://i1.piimg.com/536217/1ae9af3a274de4c7.gif)\n\n## Features\n\n- 100\uff05 full compatible with Celery\n\n- the frequency of execution for task\n\n- ...and many other stuff (o,0)\n\n\n## Author\n\n- Boyle Gu\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/boylegu/celery-task-tigger", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "celery-task-tigger", "package_url": "https://pypi.org/project/celery-task-tigger/", "platform": "", "project_url": "https://pypi.org/project/celery-task-tigger/", "project_urls": { "Homepage": "https://github.com/boylegu/celery-task-tigger" }, "release_url": "https://pypi.org/project/celery-task-tigger/0.4/", "requires_dist": null, "requires_python": "", "summary": "A controllable timing task widgets with Celery.", "version": "0.4" }, "last_serial": 2866639, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b1dbf4f212aeace971d6cc5974f7251a", "sha256": "4de9ba2fdcaf5f930fe6d264b1163577fa67dc6df6b59f3a0c4a124f5b72b17d" }, "downloads": -1, "filename": "celery-task-tigger-0.1.tar.gz", "has_sig": false, "md5_digest": "b1dbf4f212aeace971d6cc5974f7251a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2329, "upload_time": "2016-05-26T16:52:33", "url": "https://files.pythonhosted.org/packages/24/0d/ed4574626be5a234889b93f064b1a8fb6605940ce6b269b295e6b70ca66d/celery-task-tigger-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a44e8105e1ad972348f4fa70260de495", "sha256": "b1bbba0bd272794178b29acb058125210bb28e6999bb28f155ad2ec8afb378da" }, "downloads": -1, "filename": "celery-task-tigger-0.2.tar.gz", "has_sig": false, "md5_digest": "a44e8105e1ad972348f4fa70260de495", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3589, "upload_time": "2016-05-30T16:01:20", "url": "https://files.pythonhosted.org/packages/10/a3/370929f814a2d4cf6eda35f3d7998b0694d2e07fce098a9340001083304a/celery-task-tigger-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "3e6f1d62ea91281f87a310a1bed06567", "sha256": "2d5fa841e7f0811d11a5fe6655ccfedf02c64255e5b7f18eeeebc40da89f0895" }, "downloads": -1, "filename": "celery-task-tigger-0.3.tar.gz", "has_sig": false, "md5_digest": "3e6f1d62ea91281f87a310a1bed06567", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3617, "upload_time": "2016-05-30T16:36:18", "url": "https://files.pythonhosted.org/packages/59/25/fbd8b74c128554032d8c7506c521c8d7dbdea2a9f9ab40ab8fbb001d4276/celery-task-tigger-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "025199390dd758aa97a07fcd4a9e083d", "sha256": "7a6b64b7be858ae1e37cb55ef07e133d1934ff38f0aab949077cb240543b9175" }, "downloads": -1, "filename": "celery-task-tigger-0.4.tar.gz", "has_sig": false, "md5_digest": "025199390dd758aa97a07fcd4a9e083d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4207, "upload_time": "2017-05-11T10:17:37", "url": "https://files.pythonhosted.org/packages/18/1e/30c73b306ab8962464d3b3665002679d99ba17c576f1d7f21f5b8b3ff57d/celery-task-tigger-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "025199390dd758aa97a07fcd4a9e083d", "sha256": "7a6b64b7be858ae1e37cb55ef07e133d1934ff38f0aab949077cb240543b9175" }, "downloads": -1, "filename": "celery-task-tigger-0.4.tar.gz", "has_sig": false, "md5_digest": "025199390dd758aa97a07fcd4a9e083d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4207, "upload_time": "2017-05-11T10:17:37", "url": "https://files.pythonhosted.org/packages/18/1e/30c73b306ab8962464d3b3665002679d99ba17c576f1d7f21f5b8b3ff57d/celery-task-tigger-0.4.tar.gz" } ] }