{ "info": { "author": "Vincenzo Castiglia", "author_email": "vincenzo.castiglia@axant.it", "bugtrack_url": null, "classifiers": [], "description": "About tgext.celery\n-------------------------\n\ntgext.celery is a TurboGears2 extension that integrates celery into a turbogears application\n\nI tested this extension just with the celery[mongodb]==3.1 bundle of celery and pymongo==3.5.1\nusing mongodb as both message broker and result backend\n\nintegrates both ``celery beat`` and ``celery worker``\n\n\nInstalling\n-------------------------------\n\ntgext.celery can be installed from pypi::\n\n pip install tgext.celery\n\nshould just work for most of the users.\n\nPlugging\n-------------------------------\n\nTo enable tgext.celery put inside your application\n``config/app_cfg.py`` the following::\n\n from tgext.pluggable import plug\n plug(base_config, 'tgext.celery')\n\nput in your ``*.ini`` file the options that you want to pass to your celery application\nprefixed by ```celery.```::\n\n #celery config\n celery.CELERY_TASK_SERIALIZER = json\n celery.CELERY_RESULT_SERIALIZER = json\n celery.CELERY_ACCEPT_CONTENT = json\n celery.CELERY_TIMEZONE = UTC\n celery.BROKER_URL = mongodb://localhost:27017/dbname\n celery.CELERY_RESULT_BACKEND = mongodb://localhost:27017/dbname\n celery.CELERYD_POOL = celery.concurrency.threads.TaskPool\n celery.CELERY_INCLUDE = myproject.lib.celery.tasks\n celery.CELERYD_CONCURRENCY = 3\n celery.WITHOUT_GOSSIP = true\n celery.WITHOUT_HEARTBEAT = true\n celery.WITHOUT_MINGLE = true\n\nsee http://docs.celeryproject.org/en/3.1/configuration.html#configuration for other options\n\ndisabling gossip, heartbeat and mingle can be dono only from the celery worker cli, we added them\nto the configuration. We reccomend to disable them if you aren't using monitoring tools,\nbecause of a bug: https://github.com/celery/celery/issues/1047 that will fill your db with GBs of messages.\n\nyou can pass other options (that override the other in the .ini file) when plugging this extension\nthis is convenient because the options in the .ini file aren't evaluated::\n\n plug(\n base_config,\n 'tgext.celery',\n celery_config={\n 'CELERY_MONGODB_BACKEND_SETTINGS': {\n 'database': 'dbname',\n },\n 'CELERYBEAT_SCHEDULE': {\n 'delete-unassociated-images-every-12-hours': {\n 'task': 'delete_unassociated_images',\n 'schedule': timedelta(hours=12),\n },\n },\n },\n )\n\nWriting tasks\n-------------------------------\n\nRemember to set the ``CELERY_INCLUDE`` option\nhere's an example with a task::\n\n from __future__ import absolute_import\n\n from myproject import model\n\n from tgext.celery.celery import celery_app\n\n import logging\n\n logger = logging.getLogger(__name__)\n\n celery_app.config_from_object(config['celery_configuration_object'])\n\n\n @celery_app.task(name='delete_unassociated_images')\n def delete_unassociated_images():\n logger.info('started')\n model.Image.query.remove({'post_id': None})\n logger.info('finished')\n\nExecuting\n-------------------------------\n\n``tgext.celery`` sets two gearbox commands, you can run celery with::\n\n gearbox celeryworker -c production.ini --logfile=/var/log/circus/myproject_celery_worker_tasks.log\n\nand::\n\n gearbox celerybeat -c production.ini\n\nin a production environment you should put these commands in a circus watcher or supervisord\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/axant/tgext.celery.git", "keywords": "turbogears2.extension", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tgext.celery", "package_url": "https://pypi.org/project/tgext.celery/", "platform": "", "project_url": "https://pypi.org/project/tgext.celery/", "project_urls": { "Homepage": "https://github.com/axant/tgext.celery.git" }, "release_url": "https://pypi.org/project/tgext.celery/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.1.1" }, "last_serial": 3719982, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c6a74bb4e50a35af3970b736b7d721a3", "sha256": "6cb7dcae63134a8cbe7a539c77149d40815ef5da33fd1b6436a3123f0797860d" }, "downloads": -1, "filename": "tgext.celery-0.0.1.tar.gz", "has_sig": false, "md5_digest": "c6a74bb4e50a35af3970b736b7d721a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4424, "upload_time": "2017-11-15T14:52:50", "url": "https://files.pythonhosted.org/packages/89/69/56335d7d5e22f053b377929d63c2593ab53ca9ba190dc02a76455a50c4c5/tgext.celery-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "de5e28ff50d69715a192356e859a8537", "sha256": "0e3272f2470c8c830d314403c095cef6d4cb5bece91030b8ce955586f0030fcf" }, "downloads": -1, "filename": "tgext.celery-0.0.2.tar.gz", "has_sig": false, "md5_digest": "de5e28ff50d69715a192356e859a8537", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4436, "upload_time": "2017-11-15T15:12:48", "url": "https://files.pythonhosted.org/packages/fd/b5/6e1400bc7cd4813465daaa61aa3de90107ec302d44379822d67012c7eee8/tgext.celery-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "0922812144a38b0f6e7f4b492836aaf6", "sha256": "a1b8101f9b25d376e2c4ade7add08c9c92e3dec158e5f357c59923ab4d8c58d2" }, "downloads": -1, "filename": "tgext.celery-0.0.3.tar.gz", "has_sig": false, "md5_digest": "0922812144a38b0f6e7f4b492836aaf6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4460, "upload_time": "2018-03-27T13:45:23", "url": "https://files.pythonhosted.org/packages/f4/b7/a547b64f9f935b596670b6a0ccd5acfc23fe415d172bc604c8f59c7179e7/tgext.celery-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "a9615f8fc1f4a9248d2870225226aa63", "sha256": "6cb57e355f62cebd0009abc7a6786a7c978a297afc1b9208dcb46e67a693a0b1" }, "downloads": -1, "filename": "tgext.celery-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a9615f8fc1f4a9248d2870225226aa63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4733, "upload_time": "2018-03-28T10:10:16", "url": "https://files.pythonhosted.org/packages/2b/82/8ff1c134f5eb343558fadf48043703f9f42c068e699d12bf57dc9a0f4955/tgext.celery-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d4007ed9fe7d3d19cd88a9b9143ff3b4", "sha256": "5772ef79bdab5afcb5fa18501a182208469eec54e640fad06e8eef3c96f178cc" }, "downloads": -1, "filename": "tgext.celery-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d4007ed9fe7d3d19cd88a9b9143ff3b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4914, "upload_time": "2018-03-30T15:28:12", "url": "https://files.pythonhosted.org/packages/2b/75/a77adf199119aa66df61f7960ed4f4b216078d6aea3185c164c2204e139f/tgext.celery-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d4007ed9fe7d3d19cd88a9b9143ff3b4", "sha256": "5772ef79bdab5afcb5fa18501a182208469eec54e640fad06e8eef3c96f178cc" }, "downloads": -1, "filename": "tgext.celery-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d4007ed9fe7d3d19cd88a9b9143ff3b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4914, "upload_time": "2018-03-30T15:28:12", "url": "https://files.pythonhosted.org/packages/2b/75/a77adf199119aa66df61f7960ed4f4b216078d6aea3185c164c2204e139f/tgext.celery-0.1.1.tar.gz" } ] }