{ "info": { "author": "LOGILAB S.A. (Paris, FRANCE)", "author_email": "contact@logilab.fr", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: CubicWeb", "Programming Language :: JavaScript", "Programming Language :: Python" ], "description": "Summary\n-------\n\nRun, monitor and log celery tasks.\n\n\nInstallation and setup\n----------------------\n\nDeclare tasks using celery task or cubicweb-celery cwtasks.\n\nOn worker side, install cw-celerytask-helpers_.\n\nceleryconfig.py example::\n\n CELERY_BROKER_URL = 'redis://localhost:6379/0'\n CELERY_RESULT_BACKEND = BROKER_URL\n CUBICWEB_CELERYTASK_REDIS_URL = CELERY_BROKER_URL\n CELERY_IMPORTS = ('cw_celerytask_helpers.helpers', 'module.containing.tasks')\n\n\nIn this configuration example, the ``cw_celerytask_helpers`` in\n``CELERY_IMPORTS`` is required to have logging data (in the task) sent\nback to the Cubicweb instance via Redis. The\n``CUBICWEB_CELERYTASK_REDIS_URL`` is the Redis endpoint used for this\nlogging handling mechanism.\n\n \nStart a worker::\n\n # running cubicweb tasks (celeryconfig.py will be imported from your instance config directory)\n celery -A cubicweb_celery -i worker -l info\n\n # running pure celery tasks\n celery worker -l info\n\n\nTask state synchronization requires to run the `celery-monitor` command::\n\n cubicweb-ctl celery-monitor \n\n\nEnsure to have the celeryconfig.py loaded for both cubicweb instance and\ncelery worker, enforce by settings with CELERY_CONFIG_MODULE environment\nvariable (it must be an importable python module).\n\n.. _cw-celerytask-helpers: https://www.cubicweb.org/project/cw-celerytask-helpers\n\nRunning tasks\n-------------\n\nCreate a task:\n\n.. code-block:: python\n\n from celery import current_app as app\n from celery.utils.log import get_task_logger\n\n logger = get_task_logger(__name__)\n\n @app.task(name='hi_there')\n def my_task(arg, kw=0):\n logger.info('HI %s %s!', arg, kw)\n return 42\n\n\nRun a task:\n\n.. code-block:: python\n\n from cubicweb_celerytask.entities import start_async_task\n\n cwtask = start_async_task(cnx, 'hi_there', 'THERE', kw=42)\n cnx.commit()\n\n\nstart_async_task() accept task names, task objects or task signatures:\nhttp://docs.celeryproject.org/en/latest/userguide/canvas.html#signatures\n\nFor instance, to start the above task in a dedicated queue named `myqueue`:\n\n.. code-block:: python\n\n import celery\n\n start_async_task(cnx, celery.signature('hi_there', args=('THERE',),\n kwargs={'kw': 42}, queue='myqueue'))\n\n\nTesting task based application\n------------------------------\n\nIn CubicWeb test mode, tasks don't run automatically, use\n`cubicweb_celerytask.entities.get_tasks()` to introspect them and\n`cubicweb_celerytask.entities.run_all_tasks()` to run them.\n\nAlso, CELERY_ALWAYS_EAGER and CELERY_EAGER_PROPAGATES_EXCEPTIONS are set to\nTrue by default.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.cubicweb.org/project/cubicweb-celerytask", "keywords": "", "license": "LGPL", "maintainer": "", "maintainer_email": "", "name": "cubicweb-celerytask", "package_url": "https://pypi.org/project/cubicweb-celerytask/", "platform": "", "project_url": "https://pypi.org/project/cubicweb-celerytask/", "project_urls": { "Homepage": "http://www.cubicweb.org/project/cubicweb-celerytask" }, "release_url": "https://pypi.org/project/cubicweb-celerytask/0.7.1/", "requires_dist": null, "requires_python": "", "summary": "Run and monitor celery tasks", "version": "0.7.1" }, "last_serial": 4885174, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a3b314ad339a6ddbc1d229f969ce9c46", "sha256": "71abdce1629658fc9a18a0591f7bb7fa7ad5e8e0194dfdd035bca3d97737806b" }, "downloads": -1, "filename": "cubicweb-celerytask-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a3b314ad339a6ddbc1d229f969ce9c46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17756, "upload_time": "2016-09-29T08:29:49", "url": "https://files.pythonhosted.org/packages/17/e3/3e07634a3f85d4db2995686f0db39c2f2d1c759dd1932149a2af7278a4bd/cubicweb-celerytask-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "93e3daae40711b37f9f13ac742cc5acb", "sha256": "aed0eeb37214ee590c9dc25b664d7c759b779efe5a7f5e98dc0548a25201578c" }, "downloads": -1, "filename": "cubicweb-celerytask-0.2.0.tar.gz", "has_sig": false, "md5_digest": "93e3daae40711b37f9f13ac742cc5acb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18491, "upload_time": "2016-10-17T16:13:26", "url": "https://files.pythonhosted.org/packages/df/5f/b2bc1067b765d9495aa40be0bd09956c1fa4efe7c96294d338d262147794/cubicweb-celerytask-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "e2dbeaab3e8fb04dee76f9b7d79f7fdb", "sha256": "7d0f8de9138a89ce8af7c31efdd8bff529d0059b30f781b6469474bf78ca970c" }, "downloads": -1, "filename": "cubicweb-celerytask-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e2dbeaab3e8fb04dee76f9b7d79f7fdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20854, "upload_time": "2016-12-14T22:21:21", "url": "https://files.pythonhosted.org/packages/fc/a6/da068ff76f2aa429b07693f049451aebbe92c24fa19365920161a7ec2a25/cubicweb-celerytask-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "ed3538e1296e8bbfce303c928c21b3e2", "sha256": "3ce803c06f1340fa1d445c01a95c872acc3af638cfbc1617738f070f3a9692ad" }, "downloads": -1, "filename": "cubicweb-celerytask-0.3.1.tar.gz", "has_sig": false, "md5_digest": "ed3538e1296e8bbfce303c928c21b3e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20863, "upload_time": "2016-12-19T08:41:24", "url": "https://files.pythonhosted.org/packages/df/61/5c9a1f268b47b4be6fa4ffbe799b0a3fc42b9a2f8238e744721693bf1a19/cubicweb-celerytask-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "1ed95ccd00ff62a55dcaf93bbdd476b5", "sha256": "b860e133897f05eb01d072e470c36dcb34d0fa08c232faeaf596d2cd206bc3fe" }, "downloads": -1, "filename": "cubicweb-celerytask-0.4.0.tar.gz", "has_sig": false, "md5_digest": "1ed95ccd00ff62a55dcaf93bbdd476b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21001, "upload_time": "2017-02-20T01:56:03", "url": "https://files.pythonhosted.org/packages/88/7d/05ed56a4110ba1d5f798387e521f2fd609fb892e261d6767bc0732a1fcae/cubicweb-celerytask-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "f61c583f88181d3d5882cbff2a74e694", "sha256": "95bbc65b6ddefa2194e0fdb1654cf64f4b8d61f2b9800c5ac80f53a13abfae91" }, "downloads": -1, "filename": "cubicweb-celerytask-0.4.1.tar.gz", "has_sig": false, "md5_digest": "f61c583f88181d3d5882cbff2a74e694", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21011, "upload_time": "2017-02-22T09:42:18", "url": "https://files.pythonhosted.org/packages/92/80/91622d005be627facefe8905c3c0f97b64f6042b295f9b322d5a336643ed/cubicweb-celerytask-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "ceff3b67eec30fd7e7db4f2052808d20", "sha256": "a53425419dd5ef3bd3e129c0fcd3dcd64a91134b4bd222b91367cbe548695175" }, "downloads": -1, "filename": "cubicweb-celerytask-0.4.2.tar.gz", "has_sig": false, "md5_digest": "ceff3b67eec30fd7e7db4f2052808d20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21005, "upload_time": "2017-03-14T13:43:02", "url": "https://files.pythonhosted.org/packages/d1/93/b61c895877b8fb5ca18b47237da8685e19621e17b786bd158e5593bd3ac8/cubicweb-celerytask-0.4.2.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "a2e1195763c23472e8b44f398369d8e1", "sha256": "5a79b87363342be07c52f5590143bfd7c0488e757c0c30097b980c5984bef123" }, "downloads": -1, "filename": "cubicweb-celerytask-0.5.0.tar.gz", "has_sig": false, "md5_digest": "a2e1195763c23472e8b44f398369d8e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21401, "upload_time": "2017-06-26T14:53:43", "url": "https://files.pythonhosted.org/packages/ad/c1/fc6d168827f926faa48dc9af3c77fe5ac72ca0204e0d07918c2412214b73/cubicweb-celerytask-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "6230dfb32f6ccf5f457c8f6e1913d924", "sha256": "78b0bb9a1ea1d156c248038add1ce90627dc373d000e079827b455e6627a4e52" }, "downloads": -1, "filename": "cubicweb-celerytask-0.5.1.tar.gz", "has_sig": false, "md5_digest": "6230dfb32f6ccf5f457c8f6e1913d924", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22504, "upload_time": "2018-03-06T11:25:34", "url": "https://files.pythonhosted.org/packages/36/22/fbee4d8934989b04cbaa073415ab4472d9ea6e334b1c0482ec88967e770c/cubicweb-celerytask-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "44ef39bb815465d214029949d1c775bb", "sha256": "f6b4cb0fa2c536a26c420cdb394e42551281f5e37ce3e7f0bfa64a04043cdf62" }, "downloads": -1, "filename": "cubicweb-celerytask-0.6.0.tar.gz", "has_sig": false, "md5_digest": "44ef39bb815465d214029949d1c775bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23218, "upload_time": "2018-06-26T13:25:50", "url": "https://files.pythonhosted.org/packages/2a/a6/5a6b067f3728ea0d64de22df20dd1617fa4942ff83940b5be64a061a985e/cubicweb-celerytask-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "5d1691bbd4c4c1e219cea0bc929a5223", "sha256": "09da947aaf97a81173ab992493080138670f1a6df17aa2a041d9299a00dd3814" }, "downloads": -1, "filename": "cubicweb-celerytask-0.6.1.tar.gz", "has_sig": false, "md5_digest": "5d1691bbd4c4c1e219cea0bc929a5223", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22881, "upload_time": "2018-08-23T10:06:59", "url": "https://files.pythonhosted.org/packages/3e/84/6266e499d60208c18e88bdb17e5b2ffbe169bc866cfd93a2d85e5a6be338/cubicweb-celerytask-0.6.1.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "8f406cd7720493c04a37df2450a6bd6c", "sha256": "71522dde30fc810306bb14c7d5a66c9acc3dde041a7accc2116d63f206021c6c" }, "downloads": -1, "filename": "cubicweb-celerytask-0.7.0.tar.gz", "has_sig": false, "md5_digest": "8f406cd7720493c04a37df2450a6bd6c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19157, "upload_time": "2019-02-07T17:02:52", "url": "https://files.pythonhosted.org/packages/ab/9c/ef0d0a6b91fd3c7f2a2ba676dc384bb9539c6e85362d736c82707f57aea0/cubicweb-celerytask-0.7.0.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "8355408e31ccf8204e14ead8b5a63b11", "sha256": "754127f02ad1e9d986dbd06fcd823e64b4f91ce84184aa6bf14854343c0fe581" }, "downloads": -1, "filename": "cubicweb-celerytask-0.7.1.tar.gz", "has_sig": false, "md5_digest": "8355408e31ccf8204e14ead8b5a63b11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19855, "upload_time": "2019-03-01T15:03:32", "url": "https://files.pythonhosted.org/packages/bd/f3/672e44f6bc45883f455feaba605d94c9cf235eeaece10562a190f11d2122/cubicweb-celerytask-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8355408e31ccf8204e14ead8b5a63b11", "sha256": "754127f02ad1e9d986dbd06fcd823e64b4f91ce84184aa6bf14854343c0fe581" }, "downloads": -1, "filename": "cubicweb-celerytask-0.7.1.tar.gz", "has_sig": false, "md5_digest": "8355408e31ccf8204e14ead8b5a63b11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19855, "upload_time": "2019-03-01T15:03:32", "url": "https://files.pythonhosted.org/packages/bd/f3/672e44f6bc45883f455feaba605d94c9cf235eeaece10562a190f11d2122/cubicweb-celerytask-0.7.1.tar.gz" } ] }