{ "info": { "author": "Florent Messa", "author_email": "florent.messa@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "==============\ndjango-rq-mail\n==============\n\ndjango-rq-mail is a simple Python library based on rq_ to store emails sent\nby Django_ and process them in the background with workers.\n\nAs django-rq-mail is based on rq_, it's entirely backed by Redis_.\n\nArchitecture\n------------\n\ndjango-rq-mail adds new elements to enjoy `Sorted Sets `_\nfrom Redis_.\n\nFor the purpose of django-rq-mail, it implements the concept of ``WaitingQueue``\nwhich delays the processing of a job with a timestamp.\n\nThe default behavior of rq_ is to process jobs via `BLPOP `_ which\nblocks the connection when there are no elements to pop from any of the given queues.\nWith this behavior there is no way to delays the processing of a job and when it's failing\nrq_ pushs it in a failed queue.\nOf course, you can requeue this job later but there is no fallback mechanism.\n\nIn django-rq-mail you can define fallback steps (in seconds) to retry a job until\nit's not failing. When a job has been tested on each steps we reintroduce\nthe default behavior of rq_ on pushing it in the failed queue.\n\nEach steps will create a waiting queue and when a job is failing we take the\ncurrent timestamp with the delta to retry it in the future.\n\n.. image:: http://yuml.me/895ce159\n\nThis mechanism is possible with `ZADD `_ which\nadds a serialized job in the queue with a score and `ZREVRANGEBYSCORE `_\nto return all the elements in the sorted set with a score between max (current timestamp) and min.\n\nAs you may understood, we have dropped the default blocking behavior\nto replace it by a daemon which is running each seconds.\n\n\nInstallation\n------------\n\n1. Either check out the package from GitHub_ or it pull from a release via PyPI ::\n\n pip install django-rq-mail\n\n\n2. Add 'rq_mail' to your ``INSTALLED_APPS`` ::\n\n INSTALLED_APPS = (\n 'rq_mail',\n )\n\nto use the `rq_mail` command (via Django commandline) shipped by django-rq-mail.\n\nThis command is a minimal integration of rq_ into Django_ to launch the\n**Dispatcher**.\n\n3. Define ``EMAIL_BACKEND`` ::\n\n EMAIL_BACKEND = 'rq_mail.backends.RqBackend'\n\n4. Define ``RQ_MAIL_EMAIL_BACKEND`` the backend used to send your emails, for example ::\n\n RQ_MAIL_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'\n\nLogging\n-------\n\nRQ 0.3.3 uses standard Python's ``logging``, this means\nyou can easily configure ``rqworker``'s logging mechanism in django's\n``settings.py``. For example:\n\n.. code-block:: python\n\n LOGGING = {\n 'version': 1,\n 'disable_existing_loggers': False,\n 'formatters': {\n 'rq_console': {\n 'format': '%(asctime)s %(message)s',\n 'datefmt': '%H:%M:%S',\n },\n },\n 'handlers': {\n 'rq_console': {\n 'level': 'DEBUG',\n 'class': 'rq.utils.ColorizingStreamHandler',\n 'formatter': 'rq_console',\n 'exclude': ['%(asctime)s'],\n },\n },\n 'loggers': {\n 'rq.worker': {\n 'handlers': ['rq_console'],\n 'level': 'DEBUG'\n },\n }\n }\n\nUtilisation\n-----------\n\nOnce you have installed it, you can run ``python manage.py rq_mail`` from your shell.\n\nConfiguration\n-------------\n\n``RQ_MAIL_PREFIX``\n..................\n\nThe prefix used to name all queues created by django-rq-mail.\n\n``RQ_MAIL_MAIN_QUEUE``\n......................\n\nThe name of the main queue.\n\n``RQ_MAIL_EMAIL_BACKEND``\n.........................\n\nThe email backend used to send emails when they are processed in the background.\n\n``RQ_MAIL_REDIS_HOST``\n......................\n\nThe Redis host used to connect.\n\n``RQ_MAIL_REDIS_PORT``\n......................\n\nThe Redis port used to connect.\n\n``RQ_MAIL_REDIS_DB``\n....................\n\nThe Redis database used to connect.\n\n``RQ_MAIL_REDIS_PASSWORD``\n..........................\n\nThe Redis password used to connect.\n\n``RQ_MAIL_REDIS_URL``\n..........................\n\nThe Redis url used to connect.\n\n``RQ_MAIL_REDIS_SOCKET``\n..........................\n\nThe Redis socket used to connect.\n\n``RQ_MAIL_FALLBACK_STEPS``\n..........................\n\nA simple list of timing to create waiting queues.\n\nYou can define as much steps as you want, each will be transformed to a queue.\nSo if you define 10 steps, you will allow a message to fail 10 times until it\nwill go in the failed queue.\n\n.. _Django: https://www.djangoproject.com/\n.. _rq: https://github.com/nvie/rq\n.. _Redis: http://redis.io/\n.. _GitHub: https://github.com/thoas/django-rq-mail", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/thoas/django-rq-mail", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-rq-mail", "package_url": "https://pypi.org/project/django-rq-mail/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-rq-mail/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/thoas/django-rq-mail" }, "release_url": "https://pypi.org/project/django-rq-mail/0.1.3.alpha/", "requires_dist": null, "requires_python": null, "summary": "simple Python library based on rq to store emails sent by Django and process them in the background with workers", "version": "0.1.3.alpha" }, "last_serial": 864716, "releases": { "0.1.1.alpha": [ { "comment_text": "", "digests": { "md5": "40dfbedbeddbebaa7b3b65112ad508eb", "sha256": "489ffc307527b643ba52ae2cd42ed0133281e1a724e6041bdae2acf95d20df93" }, "downloads": -1, "filename": "django-rq-mail-0.1.1.alpha.tar.gz", "has_sig": true, "md5_digest": "40dfbedbeddbebaa7b3b65112ad508eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7590, "upload_time": "2013-04-10T08:39:54", "url": "https://files.pythonhosted.org/packages/d5/80/648790a1de2f9874052a230786b44e9a8eb5e5b7e30629cd6e0a23a78f41/django-rq-mail-0.1.1.alpha.tar.gz" } ], "0.1.2.alpha": [ { "comment_text": "", "digests": { "md5": "f1cf854806639182263e515494608303", "sha256": "e4fff65f5f2739938bad38d93fe7b6ff6ab934abbd1f78f62be08c546158f793" }, "downloads": -1, "filename": "django-rq-mail-0.1.2.alpha.tar.gz", "has_sig": true, "md5_digest": "f1cf854806639182263e515494608303", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7625, "upload_time": "2013-09-11T16:42:24", "url": "https://files.pythonhosted.org/packages/77/40/94ebd5aef538aeba7d400389399a9d0c4093319c15db245d630950713632/django-rq-mail-0.1.2.alpha.tar.gz" } ], "0.1.3.alpha": [ { "comment_text": "", "digests": { "md5": "a306de17d04aa1b34bc3ef21c37b255f", "sha256": "bb4f2623974fc5367a7fd0c772901ecc3a986200fce8903d0254dd8acc2a7914" }, "downloads": -1, "filename": "django-rq-mail-0.1.3.alpha.tar.gz", "has_sig": true, "md5_digest": "a306de17d04aa1b34bc3ef21c37b255f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7643, "upload_time": "2013-09-13T10:47:14", "url": "https://files.pythonhosted.org/packages/35/2c/b9b83c919e48f949dc724760aede613fbe1a472c856183be804ca44b66a3/django-rq-mail-0.1.3.alpha.tar.gz" } ], "0.1.alpha": [ { "comment_text": "", "digests": { "md5": "a21fd17b3c65ffde38374629bdca71ad", "sha256": "836433349fea906bd4728abd4f946263d1df5f919552784b7218a79abeab802c" }, "downloads": -1, "filename": "django-rq-mail-0.1.alpha.tar.gz", "has_sig": true, "md5_digest": "a21fd17b3c65ffde38374629bdca71ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7337, "upload_time": "2012-09-26T11:26:10", "url": "https://files.pythonhosted.org/packages/98/73/22091aebd7cfb3d531532fad288eddf7097c200961063dc3c1e31e8fb28b/django-rq-mail-0.1.alpha.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a306de17d04aa1b34bc3ef21c37b255f", "sha256": "bb4f2623974fc5367a7fd0c772901ecc3a986200fce8903d0254dd8acc2a7914" }, "downloads": -1, "filename": "django-rq-mail-0.1.3.alpha.tar.gz", "has_sig": true, "md5_digest": "a306de17d04aa1b34bc3ef21c37b255f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7643, "upload_time": "2013-09-13T10:47:14", "url": "https://files.pythonhosted.org/packages/35/2c/b9b83c919e48f949dc724760aede613fbe1a472c856183be804ca44b66a3/django-rq-mail-0.1.3.alpha.tar.gz" } ] }