{ "info": { "author": "Ivan Surov", "author_email": "ivansurovv@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "==================\ndjango-async-tasks\n==================\n\nIt's a simple system to process queue task in real time.\n\n\nRequirements\n------------\n\n* python 2.7\n* Django 1.6 through Django 1.9\n* django-redis-cache\n\n\n\nInstall\n-------\n\n1. Download it from PyPi with ``pip install django-async-tasks``\n\n2. Add \"async_tasks\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = (\n ...\n 'async_tasks',\n )\n\n3. Configure settings\n\n* Set setting name that defined for Redis in ``settings.CACHES``. The default used 'default' setting name. ::\n\n ASYNC_TASKS_REDIS_SETTING_NAME = 'default'\n\n* Setup log path and log filename. The default used for path ``os.path.join(BASE_DIR, 'logs')`` and filename ``'async-tasks.log'``. ::\n\n ASYNC_TASKS_LOG_PATH = os.path.join(BASE_DIR, 'logs') # Log path\n ASYNC_TASKS_LOG_FILENAME = 'async-tasks.log' # Log filename\n\n4. Add cron job to execute every minute::\n\n python manage.py django_async_tasks\n\n\nHow to use?\n-----------\n\n1. Add task to execute ``delayed_task(your_function, **params)``, return identification code\n2. Check is task ready ``ready_task(identification_code)``. Return statuses: ``'PROCESS'``, ``'SUCCESS'``, ``'FAIL'``\n3. Get result ``result_task(identification_code)``\n\n\nExample\n-------\n\n.. code:: python\n\n from async_tasks.utils import delay_task, ready_task, result_task\n\n def test(a, b):\n return a + b\n\n def test_delay_task():\n idn = delay_task(test, **{'a': 1, 'b': 2})\n status = None\n while status not in ['SUCCESS', 'FAIL']:\n status = ready_task(idn)\n\n if status == 'SUCCESS':\n print result_task(idn)\n else:\n print status\n\n\n if __name__ == \"__main__\":\n test_delay_task()", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ivansurov/django-async-tasks", "keywords": "task queue,job queue,async tasks,redis,python,django", "license": "GNU General Public License (GPL)", "maintainer": null, "maintainer_email": null, "name": "django-async-tasks", "package_url": "https://pypi.org/project/django-async-tasks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-async-tasks/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ivansurov/django-async-tasks" }, "release_url": "https://pypi.org/project/django-async-tasks/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Django application. It's a simple system to process queue task in real time.", "version": "0.1.1" }, "last_serial": 2188333, "releases": { "0.1.0": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "aa3b68a3ad2eb65a6f16dd3fe3ae3986", "sha256": "c8409e090540266da4122f3a727883f209604d2ccbd5ea294c3853cd16a3b09f" }, "downloads": -1, "filename": "django-async-tasks-0.1.1.tar.gz", "has_sig": false, "md5_digest": "aa3b68a3ad2eb65a6f16dd3fe3ae3986", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13231, "upload_time": "2016-06-26T22:35:45", "url": "https://files.pythonhosted.org/packages/35/14/f092656e3e8fae328cbf76308d631240c5386ec47ec7f8deacf7dd2fdaf1/django-async-tasks-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aa3b68a3ad2eb65a6f16dd3fe3ae3986", "sha256": "c8409e090540266da4122f3a727883f209604d2ccbd5ea294c3853cd16a3b09f" }, "downloads": -1, "filename": "django-async-tasks-0.1.1.tar.gz", "has_sig": false, "md5_digest": "aa3b68a3ad2eb65a6f16dd3fe3ae3986", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13231, "upload_time": "2016-06-26T22:35:45", "url": "https://files.pythonhosted.org/packages/35/14/f092656e3e8fae328cbf76308d631240c5386ec47ec7f8deacf7dd2fdaf1/django-async-tasks-0.1.1.tar.gz" } ] }