diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..843a7714 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,31 @@ +Ordered by date of first contribution: + Ask Solem + Grégoire Cachet + Vitaly Babiy + Brian Rosner + Sean Creeley + Ben Firshman + Augusto Becciu + Jonatan Heyman + Mark Hellewell + Jerzy Kozera + Brad Jasper + Wes Winham + Timo Sugliani + Michael Elsdoerfer + Jason Baker + Wes Turner + Maxim Bodyansky + Rune Halvorsen + Aaron Ross + Adam Endicott + Jesper Noehr + Mark Stover + Andrew Watts + Felix Berger + Mikhail Korobov + Jeff Balogh + Patrick Altman + Vincent Driessen + Hari diff --git a/Changelog b/Changelog new file mode 100644 index 00000000..0e4f1b65 --- /dev/null +++ b/Changelog @@ -0,0 +1,8 @@ +================ + Change history +================ + +1.1.0 [xxxx-xx-xx xx:xx x.x xxxx] +================================= + +* Initial release diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..c77b6efb --- /dev/null +++ b/INSTALL @@ -0,0 +1,19 @@ +Installing django-celery +======================== + +You can install ``django-celery`` either via the Python Package Index (PyPI) +or from source. + +To install using ``pip``,:: + + $ pip install django-celery + +To install using ``easy_install``,:: + + $ easy_install django-celery + +If you have downloaded a source tarball you can install it +by doing the following,:: + + $ python setup.py build + # python setup.py install # as root diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..81d19cef --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2009, Ask Solem +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +Neither the name of Ask Solem nor the names of its contributors may be used +to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 00000000..28628e7d --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,19 @@ +include AUTHORS +include Changelog +include README +include README.rst +include MANIFEST.in +include LICENSE +include TODO +include THANKS +include pavement.py +include setup.cfg +recursive-include djcelery *.py +recursive-include docs * +recursive-include tests * +recursive-include contrib * +prune tests/*.pyc +prune docs/*.pyc +prune contrib/*.pyc +prune djcelery/*.pyc +prune docs/.build diff --git a/README b/README new file mode 120000 index 00000000..92cacd28 --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.rst \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 00000000..f487fa07 --- /dev/null +++ b/README.rst @@ -0,0 +1,135 @@ +=============================================== + django-celery - Celery Integration for Django +=============================================== + +.. image:: http://cloud.github.com/downloads/ask/celery/celery_favicon_128.png + +:Version: 1.1.0 +:Web: http://celeryproject.org/ +:Download: http://pypi.python.org/pypi/django-celery/ +:Source: http://github.com/ask/django-celery/ +:Keywords: celery, task queue, job queue, asynchronous, rabbitmq, amqp, redis, + python, django, webhooks, queue, distributed + +-- + +django-celery provides Celery integration for Django; Using the Django ORM +and cache backend for storing results, autodiscovery of task modules +for applications listed in ``INSTALLED_APPS``, and more. + +`Celery`_ is a task queue/job queue based on distributed message passing. +It is focused on real-time operation, but supports scheduling as well. + +The execution units, called tasks, are executed concurrently on a single or +more worker servers. Tasks can execute asynchronously (in the background) or synchronously +(wait until ready). + +Celery is already used in production to process millions of tasks a day. + +Celery is written in Python, but the protocol can be implemented in any +language. It can also `operate with other languages using webhooks`_. + +The recommended message broker is `RabbitMQ`_, but support for `Redis`_ and +databases (`SQLAlchemy`_ / `Django`_) is also available. + +.. _`Celery`: http://celeryproject.org/ +.. _`RabbitMQ`: http://www.rabbitmq.com/ +.. _`Redis`: http://code.google.com/p/redis/ +.. _`SQLAlchemy`: http://www.sqlalchemy.org/ +.. _`operate with other languages using webhooks`: + http://ask.github.com/celery/userguide/remote-tasks.html + +Documentation +============= + +The `latest documentation`_ with user guides, tutorials and API reference +is hosted at Github. Be sure to also read the `Celery User Manual`_. + +.. _`latest documentation`: http://celeryproject.org/docs/django-celery/ +.. _`Celery User Manual`: http://celeryproject.org/docs/ + +Installation +============= + +You can install ``django-celery`` either via the Python Package Index (PyPI) +or from source. + +To install using ``pip``,:: + + $ pip install django-celery + +To install using ``easy_install``,:: + + $ easy_install django-celery + +Downloading and installing from source +-------------------------------------- + +Download the latest version of ``django-celery`` from +http://pypi.python.org/pypi/django-celery/ + +You can install it by doing the following,:: + + $ tar xvfz django-celery-0.0.0.tar.gz + $ cd django-celery-0.0.0 + $ python setup.py build + # python setup.py install # as root + +Using the development version +------------------------------ + +You can clone the repository by doing the following:: + + $ git clone git://github.com/ask/django-celery.git + + +Getting Help +============ + +Mailing list +------------ + +For discussions about the usage, development, and future of celery, +please join the `celery-users`_ mailing list. + +.. _`celery-users`: http://groups.google.com/group/celery-users/ + +IRC +--- + +Come chat with us on IRC. The `#celery`_ channel is located at the `Freenode`_ +network. + +.. _`#celery`: irc://irc.freenode.net/celery +.. _`Freenode`: http://freenode.net + + +Bug tracker +=========== + +If you have any suggestions, bug reports or annoyances please report them +to our issue tracker at http://github.com/ask/django-celery/issues/ + +Wiki +==== + +http://wiki.github.com/ask/celery/ + +Contributing +============ + +Development of ``django-celery`` happens at Github: +http://github.com/ask/django-celery + +You are highly encouraged to participate in the development +of ``celery``. If you don't like Github (for some reason) you're welcome +to send regular patches. + +License +======= + +This software is licensed under the ``New BSD License``. See the ``LICENSE`` +file in the top distribution directory for the full license text. + +.. # vim: syntax=rst expandtab tabstop=4 shiftwidth=4 shiftround + diff --git a/THANKS b/THANKS new file mode 100644 index 00000000..eea1b847 --- /dev/null +++ b/THANKS @@ -0,0 +1,6 @@ +Thanks to Rune Halvorsen for the name. +Thanks to Anton Tsigularov for the previous name (crunchy) + which we had to abandon because of an existing project with that name. +Thanks to Martin Mahner for the Sphinx theme. +Thanks to Brian K. Jones for bunny.py (http://github.com/bkjones/bunny), the + tool that inspired camqadm. diff --git a/TODO b/TODO new file mode 100644 index 00000000..77b12379 --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +Please see our Issue Tracker at GitHub: + http://github.com/ask/django-celery/issues diff --git a/pavement.py b/pavement.py new file mode 100644 index 00000000..1a10c91b --- /dev/null +++ b/pavement.py @@ -0,0 +1,139 @@ +from paver.easy import * +from paver import doctools +from paver.setuputils import setup + +options( + sphinx=Bunch(builddir=".build"), +) + +def sphinx_builddir(options): + return path("docs") / options.sphinx.builddir / "html" + + +@task +def clean_docs(options): + sphinx_builddir(options).rmtree() + + +@task +@needs("clean_docs", "paver.doctools.html") +def html(options): + destdir = path("Documentation") + destdir.rmtree() + builtdocs = sphinx_builddir(options) + builtdocs.move(destdir) + + +@task +@needs("clean_docs", "paver.doctools.html") +def ghdocs(options): + builtdocs = sphinx_builddir(options) + sh("sphinx-to-github", cwd=builtdocs) + sh("git checkout gh-pages && \ + cp -r %s/* . && \ + git commit . -m 'Rendered documentation for Github Pages.' && \ + git push origin gh-pages && \ + git checkout master" % builtdocs) + + +@task +@needs("clean_docs", "paver.doctools.html") +def upload_pypi_docs(options): + builtdocs = path("docs") / options.builddir / "html" + sh("python setup.py upload_sphinx --upload-dir='%s'" % (builtdocs)) + + +@task +@needs("upload_pypi_docs", "ghdocs") +def upload_docs(options): + pass + + +@task +def autodoc(options): + sh("contrib/release/doc4allmods djcelery") + + +@task +def verifyindex(options): + sh("contrib/release/verify-reference-index.sh") + + +@task +def flakes(options): + sh("find djcelery -name '*.py' | xargs pyflakes") + + +@task +def clean_readme(options): + path("README").unlink() + path("README.rst").unlink() + + +@task +@needs("clean_readme") +def readme(options): + sh("python contrib/release/sphinx-to-rst.py docs/templates/readme.txt \ + > README.rst") + sh("ln -sf README.rst README") + + +@task +def bump(options): + sh("bump -c djcelery") + + +@task +@cmdopts([ + ("coverage", "c", "Enable coverage"), + ("quick", "q", "Quick test"), + ("verbose", "V", "Make more noise"), +]) +def test(options): + cmd = "python manage.py test" + if getattr(options, "coverage", False): + cmd += " --coverage" + if getattr(options, "quick", False): + cmd = "env QUICKTEST=1 SKIP_RLIMITS=1 %s" % cmd + if getattr(options, "verbose", False): + cmd += " --verbosity=2" + sh(cmd, cwd="tests") + + +@task +@cmdopts([ + ("noerror", "E", "Ignore errors"), +]) +def pep8(options): + noerror = getattr(options, "noerror", False) + return sh("""find . -name "*.py" | xargs pep8 | perl -nle'\ + print; $a=1 if $_}{exit($a)'""", ignore_error=noerror) + + +@task +def removepyc(options): + sh("find . -name '*.pyc' | xargs rm") + + +@task +@needs("removepyc") +def gitclean(options): + sh("git clean -xdn") + + +@task +@needs("removepyc") +def gitcleanforce(options): + sh("git clean -xdf") + + +@task +@needs("pep8", "autodoc", "verifyindex", "test", "gitclean") +def releaseok(options): + pass + + +@task +@needs("releaseok", "removepyc", "upload_docs") +def release(options): + pass