[Python-modules-commits] [python-django-celery-beat] 01/16: importing python-django-celery-beat_1.0.1.orig.tar.gz

Michael Fladischer fladi at moszumanska.debian.org
Fri Nov 24 11:09:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to branch debian/master
in repository python-django-celery-beat.

commit bb73ce1a10289b7c3c05a3f7928d836d62e04354
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Thu Aug 10 19:28:36 2017 +0200

    importing python-django-celery-beat_1.0.1.orig.tar.gz
---
 .bumpversion.cfg                                   |  15 +
 .cookiecutterrc                                    |  26 ++
 .coveragerc                                        |  11 +
 .editorconfig                                      |  14 +
 .gitignore                                         |  32 +++
 .travis.yml                                        |  33 +++
 AUTHORS                                            |  91 ++++++
 Changelog                                          |  27 ++
 LICENSE                                            |  54 ++++
 MANIFEST.in                                        |  17 ++
 Makefile                                           | 152 ++++++++++
 README.rst                                         | 257 +++++++++++++++++
 appveyor.yml                                       |  53 ++++
 django_celery_beat/__init__.py                     |  34 +++
 django_celery_beat/admin.py                        | 145 ++++++++++
 django_celery_beat/apps.py                         |  15 +
 django_celery_beat/managers.py                     |  34 +++
 django_celery_beat/migrations/0001_initial.py      | 132 +++++++++
 django_celery_beat/migrations/__init__.py          |   0
 django_celery_beat/models.py                       | 258 +++++++++++++++++
 django_celery_beat/schedulers.py                   | 285 +++++++++++++++++++
 .../templates/admin/djcelery/change_list.html      |  20 ++
 django_celery_beat/utils.py                        |  41 +++
 docs/Makefile                                      | 238 ++++++++++++++++
 docs/_static/.keep                                 |   0
 docs/_templates/.keep                              |   0
 docs/changelog.rst                                 |   1 +
 docs/conf.py                                       |  27 ++
 docs/copyright.rst                                 |  28 ++
 docs/glossary.rst                                  |  10 +
 docs/images/favicon.ico                            | Bin 0 -> 3364 bytes
 docs/images/logo.png                               | Bin 0 -> 26250 bytes
 docs/includes/installation.txt                     |  42 +++
 docs/includes/introduction.txt                     | 184 ++++++++++++
 docs/index.rst                                     |  32 +++
 docs/make.bat                                      | 272 ++++++++++++++++++
 docs/reference/django-celery-beat.admin.rst        |  11 +
 docs/reference/django-celery-beat.managers.rst     |  11 +
 docs/reference/django-celery-beat.models.rst       |  11 +
 docs/reference/django-celery-beat.rst              |  11 +
 docs/reference/django-celery-beat.schedulers.rst   |  11 +
 docs/reference/django-celery-beat.utils.rst        |  11 +
 docs/reference/index.rst                           |  18 ++
 docs/templates/readme.txt                          |  32 +++
 extra/appveyor/install.ps1                         |  85 ++++++
 extra/appveyor/run_with_compiler.cmd               |  47 +++
 manage.py                                          |  11 +
 requirements/default.txt                           |   1 +
 requirements/docs.txt                              |   2 +
 requirements/pkgutils.txt                          |   8 +
 requirements/test-ci.txt                           |   2 +
 requirements/test-django.txt                       |   1 +
 requirements/test-django110.txt                    |   1 +
 requirements/test-django18.txt                     |   1 +
 requirements/test-django19.txt                     |   1 +
 requirements/test.txt                              |   4 +
 setup.cfg                                          |  16 ++
 setup.py                                           | 157 ++++++++++
 t/.coveragerc                                      |  15 +
 t/__init__.py                                      |   0
 t/proj/__init__.py                                 |   1 +
 t/proj/celery.py                                   |  15 +
 t/proj/settings.py                                 | 119 ++++++++
 t/proj/urls.py                                     |   8 +
 t/proj/wsgi.py                                     |  17 ++
 t/unit/__init__.py                                 |   0
 t/unit/conftest.py                                 |  36 +++
 t/unit/test_schedulers.py                          | 315 +++++++++++++++++++++
 tox.ini                                            |  75 +++++
 69 files changed, 3634 insertions(+)

diff --git a/.bumpversion.cfg b/.bumpversion.cfg
new file mode 100644
index 0000000..f97eab0
--- /dev/null
+++ b/.bumpversion.cfg
@@ -0,0 +1,15 @@
+[bumpversion]
+current_version = 1.0.1
+commit = True
+tag = True
+parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<releaselevel>[a-z]+)?
+serialize = 
+	{major}.{minor}.{patch}{releaselevel}
+	{major}.{minor}.{patch}
+
+[bumpversion:file:django_celery_beat/__init__.py]
+
+[bumpversion:file:docs/includes/introduction.txt]
+
+[bumpversion:file:README.rst]
+
diff --git a/.cookiecutterrc b/.cookiecutterrc
new file mode 100644
index 0000000..f000ec8
--- /dev/null
+++ b/.cookiecutterrc
@@ -0,0 +1,26 @@
+# This file exists so you can easily regenerate your project.
+#
+# `cookiepatcher` is a convenient shim around `cookiecutter`
+# for regenerating projects (it will generate a .cookiecutterrc
+# automatically for any template). To use it:
+#
+#    pip install cookiepatcher
+#    cookiepatcher gh:ionelmc/cookiecutter-pylibrary project-path
+#
+# See:
+#    https://pypi.python.org/pypi/cookiecutter
+#
+# Alternatively, you can run:
+#
+#    cookiecutter --overwrite-if-exists --config-file=project-path/.cookiecutterrc gh:ionelmc/cookiecutter-pylibrary
+
+default_context:
+
+    email:                     'ask at celeryproject.org'
+    full_name:                 'Ask Solem'
+    github_username:           'celery'
+    project_name:              'django-celery-beat'
+    project_short_description: 'Database-backed Periodic Tasks'
+    project_slug:              'django-celery-beat'
+    version:                   '1.0.0'
+    year:                      '2016'
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..97b98e8
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,11 @@
+[run]
+branch = 1
+cover_pylib = 0
+include = *django_celery_beat/*
+omit = django_celery_beat.tests.*
+
+[report]
+omit =
+    */python?.?/*
+    */site-packages/*
+    */pypy/*
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..22fb1f9
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,14 @@
+# http://editorconfig.org
+
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+insert_final_newline = true
+charset = utf-8
+end_of_line = lf
+
+[Makefile]
+indent_style = tab
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cd106d1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,32 @@
+.DS_Store
+*.pyc
+*$py.class
+*~
+.*.sw[pon]
+dist/
+*.egg-info
+*.egg
+*.egg/
+build/
+.build/
+_build/
+pip-log.txt
+.directory
+erl_crash.dump
+*.db
+Documentation/
+.tox/
+.ropeproject/
+.project
+.pydevproject
+.idea/
+.coverage
+celery/tests/cover/
+.ve*
+cover/
+.vagrant/
+*.sqlite3
+.cache/
+htmlcov/
+coverage.xml
+.eggs/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..7128256
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,33 @@
+language: python
+sudo: false
+cache: false
+python:
+    - '3.5'
+os:
+    - linux
+env:
+  global:
+    PYTHONUNBUFFERED=yes
+  matrix:
+    - TOXENV=2.7-django1.10
+    - TOXENV=2.7-django1.9
+    - TOXENV=2.7-django1.8
+    - TOXENV=pypy-django1.10
+    - TOXENV=pypy-django1.9
+    - TOXENV=pypy-django1.8
+    - TOXENV=3.4-django1.10
+    - TOXENV=3.4-django1.9
+    - TOXENV=3.4-django1.8
+    - TOXENV=3.5-django1.10
+    - TOXENV=3.5-django1.9
+    - TOXENV=3.5-django1.8
+    - TOXENV=flake8
+    - TOXENV=flakeplus
+    - TOXENV=apicheck
+    - TOXENV=pydocstyle
+    - TOXENV=cov
+install: travis_retry pip install -U tox
+script: tox -v -- -v
+after_success:
+  - .tox/$TRAVIS_PYTHON_VERSION/bin/coverage xml
+  - .tox/$TRAVIS_PYTHON_VERSION/bin/codecov -e TOXENV
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..e8a5c4d
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,91 @@
+=========
+ AUTHORS
+=========
+:order: sorted
+
+Aaron Ross <aaron at wawd.com>
+Adam Endicott
+Alex Stapleton <alex.stapleton at artfinder.com>
+Alvaro Vega <avega at tid.es>
+Andrew Frankel
+Andrew Watts <andrewwatts at gmail.com>
+Andrii Kostenko <andrey at kostenko.name>
+Anton Novosyolov <anton.novosyolov at gmail.com>
+Ask Solem <ask at celeryproject.org>
+Augusto Becciu <augusto at becciu.org>
+Ben Firshman <ben at firshman.co.uk>
+Brad Jasper <bjasper at gmail.com>
+Brett Gibson <brett at swiftserve.com>
+Brian Rosner <brosner at gmail.com>
+Charlie DeTar <cfd at media.mit.edu>
+Christopher Grebs <cg at webshox.org>
+Dan LaMotte <lamotte85 at gmail.com>
+Darjus Loktevic <darjus at amazon.com>
+David Fischer <david.fischer.ch at gmail.com>
+David Ziegler <david.ziegler at gmail.com>
+Diego Andres Sanabria Martin <diegueus9 at gmail.com>
+Dmitriy Krasilnikov <krasilnikov.d.o at gmail.com>
+Donald Stufft <donald.stufft at gmail.com>
+Eldon Stegall
+Eugene Nagornyi <ideviantik at gmail.com>
+Felix Berger <bflat1 at gmx.net
+Gabe Jackson <gabejackson at cxg.ch>
+Glenn Washburn <M8R-hkaf6e at mailinator.com>
+Gnrhxni <gnrhxni at outlook.com>
+Greg Taylor <gtaylor at duointeractive.com>
+Grégoire Cachet <gregoire at audacy.fr>
+Hari <haridara at gmail.com>
+Idan Zalzberg <idanzalz at gmail.com>
+Ionel Maries Cristian <ionel.mc at gmail.com>
+Jannis Leidel <jannis at leidel.info>
+Jason Baker <amnorvend at gmail.com>
+Jay States <jstates at based.ca>
+Jeff Balogh <me at jeffbalogh.org>
+Jeff Fischer <jeffrey.fischer at gmail.com>
+Jeffrey Hu <zhiwehu at gmail.com>
+Jens Alm <jens.alm at mac.com>
+Jerzy Kozera <jerzy.kozera at gmail.com>
+Jesper Noehr <jesper at noehr.org>
+John Andrews <johna at stjit011.(none)>
+John Watson <johnw at mahalo.com>
+Jonas Haag <jonas at lophus.org>
+Jonatan Heyman <jonatan at heyman.info>
+Josh Drake <m0nikr at is-0338.(none)>
+José Moreira <zemanel at zemanel.eu>
+Jude Nagurney <jude at pwan.org>
+Justin Quick <justquick at gmail.com>
+Keith Perkins <keith at tasteoftheworld.us>
+Kirill Panshin <kipanshi at gmail.com>
+Mark Hellewell <mark.hellewell at gmail.com>
+Mark Lavin <markdlavin at gmail.com>
+Mark Stover <stovenator at gmail.com>
+Maxim Bodyansky <bodyansky at gmail.com>
+Michael Elsdoerfer <michael at elsdoerfer.com>
+Michael van Tellingen <m.vantellingen at lukkien.com>
+Mikhail Korobov <kmike84 at gmail.com>
+Olivier Tabone <olivier.tabone at gmail.com>
+Patrick Altman <paltman at gmail.com>
+Piotr Bulinski <piotr at bulinski.pl>
+Piotr Sikora <piotr.sikora at frickle.com>
+Reza Lotun <rlotun at gmail.com>
+Rockallite Wulf <rockallite.wulf at gmail.com>
+Roger Barnes <roger at mindsocket.com.au>
+Roman Imankulov <roman at netangels.ru>
+Rune Halvorsen <runefh at gmail.com>
+Sam Cooke <sam at mixcloud.com>
+Scott Rubin <srubin at broadway.com>
+Sean Creeley <sean.creeley at gmail.com>
+Serj Zavadsky <fevral13 at gmail.com>
+Simon Charette <charette.s at gmail.com>
+Spencer Ellinor <spencer.ellinor at gmail.com>
+Theo Spears <github at theos.me.uk>
+Timo Sugliani
+Vincent Driessen <vincent at datafox.nl>
+Vitaly Babiy <vbabiy86 at gmail.com>
+Vladislav Poluhin <nuklea at gmail.com>
+Weipin Xia <weipin at me.com>
+Wes Turner <wes.turner at gmail.com>
+Wes Winham <winhamwr at gmail.com>
+Williams Mendez <wmendez27 at gmail.com>
+WoLpH <Rick at Fawo.nl>
+dongweiming <ciici123 at hotmail.com>
diff --git a/Changelog b/Changelog
new file mode 100644
index 0000000..5ec084a
--- /dev/null
+++ b/Changelog
@@ -0,0 +1,27 @@
+.. _changelog:
+
+================
+ Change history
+================
+
+.. _version-1.0.1:
+
+1.0.1
+=====
+:release-date: 2016-11-07 02:28 p.m. PST
+:release-by: Ask Solem
+
+- Now depends on Celery 4.0.0.
+
+- Migration modules were not included in the distribution.
+
+- Adds documentation: http://django-celery-beat.readthedocs.io/
+
+.. _version-1.0.0:
+
+1.0.0
+=====
+:release-date: 2016-09-08 03:19 p.m. PDT
+:release-by: Ask Solem
+
+- Initial release
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..2983da2
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,54 @@
+Copyright (c) 2015-2016 Ask Solem.  All Rights Reserved.
+Copyright (c) 2012-2014 GoPivotal, Inc.  All Rights Reserved.
+Copyright (c) 2009-2012 Ask Solem.  All Rights Reserved.
+
+django-celery-beat is licensed under The BSD License (3 Clause, also known as
+the new BSD license).  The license is an OSI approved Open Source
+license and is GPL-compatible(1).
+
+The license text can also be found here:
+http://www.opensource.org/licenses/BSD-3-Clause
+
+License
+=======
+
+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 Ask Solem 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.
+
+Documentation License
+=====================
+
+The documentation portion of django-celery-beat (the rendered contents of the
+"docs" directory of a software distribution or checkout) is supplied
+under the "Creative Commons Attribution-ShareAlike 4.0
+International" (CC BY-SA 4.0) License as described by
+http://creativecommons.org/licenses/by-sa/4.0/
+
+Footnotes
+=========
+(1) A GPL-compatible license makes it possible to
+    combine django-celery-beat with other software that is released
+    under the GPL, it does not mean that we're distributing
+    django-celery-beat under the GPL license.  The BSD license, unlike the GPL,
+    let you distribute a modified version without making your
+    changes open source.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..3438853
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,17 @@
+include Changelog
+include LICENSE
+include README.rst
+include MANIFEST.in
+include setup.cfg
+include setup.py
+include manage.py
+recursive-include docs *
+recursive-include extra/*
+recursive-include examples *
+recursive-include requirements *.txt *.rst
+recursive-include django_celery_beat *.py *.html
+recursive-include t *.py
+
+recursive-exclude * __pycache__
+recursive-exclude * *.py[co]
+recursive-exclude * .*.sw[a-z]
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e340e62
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,152 @@
+PROJ=django_celery_beat
+PGPIDENT="Celery Security Team"
+PYTHON=python
+PYTEST=py.test
+GIT=git
+TOX=tox
+ICONV=iconv
+FLAKE8=flake8
+FLAKEPLUS=flakeplus
+PYDOCSTYLE=pydocstyle
+SPHINX2RST=sphinx2rst
+
+SPHINX_DIR=docs/
+SPHINX_BUILDDIR="${SPHINX_DIR}/_build"
+README=README.rst
+README_SRC="docs/templates/readme.txt"
+CONTRIBUTING=CONTRIBUTING.rst
+CONTRIBUTING_SRC="docs/contributing.rst"
+SPHINX_HTMLDIR="${SPHINX_BUILDDIR}/html"
+DOCUMENTATION=Documentation
+FLAKEPLUSTARGET=2.7
+
+TESTDIR=t
+
+all: help
+
+help:
+	@echo "docs                 - Build documentation."
+	@echo "test-all             - Run tests for all supported python versions."
+	@echo "distcheck ---------- - Check distribution for problems."
+	@echo "  test               - Run unittests using current python."
+	@echo "  lint ------------  - Check codebase for problems."
+	@echo "    apicheck         - Check API reference coverage."
+	@echo "    configcheck      - Check configuration reference coverage."
+	@echo "    readmecheck      - Check README.rst encoding."
+	@echo "    contribcheck     - Check CONTRIBUTING.rst encoding"
+	@echo "    flakes --------  - Check code for syntax and style errors."
+	@echo "      flakecheck     - Run flake8 on the source code."
+	@echo "      flakepluscheck - Run flakeplus on the source code."
+	@echo "      pep257check    - Run flakeplus on the source code."
+	@echo "readme               - Regenerate README.rst file."
+	@echo "contrib              - Regenerate CONTRIBUTING.rst file"
+	@echo "clean-dist --------- - Clean all distribution build artifacts."
+	@echo "  clean-git-force    - Remove all uncomitted files."
+	@echo "  clean ------------ - Non-destructive clean"
+	@echo "    clean-pyc        - Remove .pyc/__pycache__ files"
+	@echo "    clean-docs       - Remove documentation build artifacts."
+	@echo "    clean-build      - Remove setup artifacts."
+	@echo "bump                 - Bump patch version number."
+	@echo "bump-minor           - Bump minor version number."
+	@echo "bump-major           - Bump major version number."
+	@echo "release              - Make PyPI release."
+
+clean: clean-docs clean-pyc clean-build
+
+clean-dist: clean clean-git-force
+
+bump:
+	bumpversion patch
+
+bump-minor:
+	bumpversion minor
+
+bump-major:
+	bumpversion major
+
+release:
+	python setup.py register sdist bdist_wheel upload --sign --identity="$(PGPIDENT)"
+
+Documentation:
+	(cd "$(SPHINX_DIR)"; $(MAKE) html)
+	mv "$(SPHINX_HTMLDIR)" $(DOCUMENTATION)
+
+docs: Documentation
+
+clean-docs:
+	-rm -rf "$(SPHINX_BUILDDIR)"
+
+lint: flakecheck apicheck configcheck readmecheck
+
+apicheck:
+	(cd "$(SPHINX_DIR)"; $(MAKE) apicheck)
+
+configcheck:
+	true
+
+flakecheck:
+	$(FLAKE8) "$(PROJ)" "$(TESTDIR)"
+
+flakediag:
+	-$(MAKE) flakecheck
+
+flakepluscheck:
+	$(FLAKEPLUS) --$(FLAKEPLUSTARGET) "$(PROJ)" "$(TESTDIR)"
+
+flakeplusdiag:
+	-$(MAKE) flakepluscheck
+
+pep257check:
+	$(PYDOCSTYLE) "$(PROJ)"
+
+flakes: flakediag flakeplusdiag pep257check
+
+clean-readme:
+	-rm -f $(README)
+
+readmecheck:
+	$(ICONV) -f ascii -t ascii $(README) >/dev/null
+
+$(README):
+	$(SPHINX2RST) "$(README_SRC)" --ascii > $@
+
+readme: clean-readme $(README) readmecheck
+
+clean-contrib:
+	-rm -f "$(CONTRIBUTING)"
+
+$(CONTRIBUTING):
+	$(SPHINX2RST) "$(CONTRIBUTING_SRC)" > $@
+
+contrib: clean-contrib $(CONTRIBUTING)
+
+clean-pyc:
+	-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
+	-find . -type d -name "__pycache__" | xargs rm -r
+
+removepyc: clean-pyc
+
+clean-build:
+	rm -rf build/ dist/ .eggs/ *.egg-info/ .tox/ .coverage cover/
+
+clean-git:
+	$(GIT) clean -xdn
+
+clean-git-force:
+	$(GIT) clean -xdf
+
+test-all: clean-pyc
+	$(TOX)
+
+test:
+	$(PYTHON) setup.py test
+
+cov:
+	(cd $(TESTDIR); $(PYTEST) -x --cov="$(PROJ)" --cov-report=html)
+
+build:
+	$(PYTHON) setup.py sdist bdist_wheel
+
+distcheck: lint test clean
+
+dist: readme contrib clean-dist build
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..49e07c5
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,257 @@
+=====================================================================
+ Database-backed Periodic Tasks
+=====================================================================
+
+|build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
+
+:Version: 1.0.1
+:Web: http://django-celery-beat.readthedocs.io/
+:Download: http://pypi.python.org/pypi/django-celery-beat
+:Source: http://github.com/celery/django-celery-beat
+:Keywords: django, celery, beat, periodic task, cron, scheduling
+
+About
+=====
+
+This extension enables you to store the periodic task schedule in the
+database.
+
+The periodic tasks can be managed from the Django Admin interface, where you
+can create, edit and delete periodic tasks and how often they should run.
+
+Installing
+==========
+
+The installation instructions for this extension is available
+from the `Celery documentation`_:
+
+http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#using-custom-scheduler-classes
+
+
+.. _`Celery documentation`:
+    http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#using-custom-scheduler-classes
+
+Important Warning
+=================
+
+.. admonition:: Timezones
+
+If you change the Django ``TIME_ZONE`` setting your periodic task schedule
+will still be based on the old timezone.
+
+To fix that you would have to reset the "last run time" for each periodic
+task::
+
+    >>> from django_celery_beat import PeriodicTask, PeriodicTasks
+    >>> PeriodicTask.objects.all().update(last_run_at=None)
+    >>> PeriodicTasks.changed()
+
+Note that this will reset the state as if the periodic tasks have never run
+before.
+
+Models
+======
+
+- ``django_celery_beat.models.PeriodicTask``
+
+This model defines a single periodic task to be run.
+
+It must be associated with a schedule, which defines how often the task should
+run.
+
+- ``django_celery_beat.models.IntervalSchedule``
+
+A schedule that runs at a specific interval (e.g. every 5 seconds).
+
+- ``django_celery_beat.models.CrontabSchedule``
+
+A schedule with fields like entries in cron:
+``minute hour day-of-week day_of_month month_of_year``.
+
+- ``django_celery_beat.models.PeriodicTasks``
+
+This model is only used as an index to keep track of when the schedule has
+changed.
+
+Whenever you update a ``PeriodicTask`` a counter in this table is also
+incremented, which tells the ``celery beat`` service to reload the schedule
+from the database.
+
+If you update periodic tasks in bulk, you will need to update the counter
+manually::
+
+    >>> from django_celery_beat.models import PeriodicTasks
+    >>> PeriodicTasks.changed()
+
+Example creating interval-based periodic task
+---------------------------------------------
+
+To create a periodic task executing at an interval you must first
+create the interval object::
+
+    >>> from django_celery_beat.models import PeriodicTask, IntervalSchedule
+
+    # executes every 10 seconds.
+    >>> schedule, created = IntervalSchedule.objects.get_or_create(
+    ...     every=10,
+    ...     period=IntervalSchedule.SECONDS,
+    ... )
+
+That's all the fields you need: a period type and the frequency.
+
+You can choose between a specific set of periods:
+
+
+- ``IntervalSchedule.DAYS``
+- ``IntervalSchedule.HOURS``
+- ``IntervalSchedule.MINUTES``
+- ``IntervalSchedule.SECONDS``
+- ``IntervalSchedule.MICROSECONDS``
+
+.. note::
+
+    If you have multiple periodic tasks executing every 10 seconds,
+    then they should all point to the same schedule object.
+
+There's also a "choices tuple" available should you need to present this
+to the user::
+
+    >>> IntervalSchedule.PERIOD_CHOICES
+
+
+Now that we have defined the schedule object, we can create the periodic task
+entry::
+
+    >>> PeriodicTask.objects.create(
+    ...     interval=schedule,                  # we created this above.
+    ...     name='Importing contacts',          # simply describes this periodic task.
+    ...     task='proj.tasks.import_contacts',  # name of task.
+    ... )
+
+
+Note that this is a very basic example, you can also specify the arguments
+and keyword arguments used to execute the task, the ``queue`` to send it
+to[*], and set an expiry time.
+
+Here's an example specifying the arguments, note how JSON serialization is
+required::
+
+    >>> import json
+    >>> from datetime import datetime, timedelta
+
+    >>> PeriodicTask.objects.create(
+    ...     interval=schedule,                  # we created this above.
+    ...     name='Importing contacts',          # simply describes this periodic task.
+    ...     task='proj.tasks.import_contacts',  # name of task.
+    ...     args=json.dumps(['arg1', 'arg2']),
+    ...     kwargs=json.dumps({
+    ...        'be_careful': True,
+    ...     }),
+    ...     expires=datetime.utcnow() + timedelta(seconds=30)
+    ... )
+
+
+.. [*] you can also use low-level AMQP routing using the ``exchange`` and
+       ``routing_key`` fields.
+
+Example creating crontab-based periodic task
+--------------------------------------------
+
+A crontab schedule has the fields: ``minute``, ``hour``, ``day_of_week``,
+``day_of_month`` and ``month_of_year`, so if you want the equivalent
+of a ``30 * * * *`` (execute every 30 minutes) crontab entry you specify::
+
+    >>> from django_celery_beat.models import CrontabSchedule, PeriodicTask
+    >>> schedule, _ = CrontabSchedule.objects.get_or_create(
+    ...     minute='30',
+    ...     hour='*',
+    ...     day_of_week='*',
+    ...     day_of_month='*',
+    ...     month_of_year='*',
+    ... )
+
+
+Then to create a periodic task using this schedule, use the same approach as
+the interval-based periodic task earlier in this document, but instead
+of ``interval=schedule``, specify ``crontab=schedule``::
+
+    >>> PeriodicTask.objects.create(
+    ...     crontab=schedule,
+    ...     name='Importing contacts',
+    ...     task='proj.tasks.import_contacts',
+    ... )
+
+Temporarily disable a periodic task
+-----------------------------------
+
+You can use the ``enabled`` flag to temporarily disable a periodic task::
+
+    >>> periodic_task.enabled = False
+    >>> periodic_task.save()
+
+.. _installation:
+
+Installation
+============
+
+You can install django-celery-beat either via the Python Package Index (PyPI)
+or from source.
+
+To install using `pip`,::
+
+    $ pip install -U django-celery-beat
+
+.. _installing-from-source:
+
+Downloading and installing from source
+--------------------------------------
+
+Download the latest version of django-celery-beat from
+http://pypi.python.org/pypi/django-celery-beat
+
+You can install it by doing the following,::
+
+    $ tar xvfz django-celery-beat-0.0.0.tar.gz
+    $ cd django-celery-beat-0.0.0
+    $ python setup.py build
+    # python setup.py install
+
+The last command must be executed as a privileged user if
+you are not currently using a virtualenv.
+
+.. _installing-from-git:
+
+Using the development version
+-----------------------------
+
+With pip
+~~~~~~~~
+
+You can install the latest snapshot of django-celery-beat using the following
+pip command::
+
+    $ pip install https://github.com/celery/django-celery-beat/zipball/master#egg=django-celery-beat
+
+.. |build-status| image:: https://secure.travis-ci.org/celery/django-celery-beat.svg?branch=master
+    :alt: Build status
+    :target: https://travis-ci.org/celery/django-celery-beat
+
+.. |coverage| image:: https://codecov.io/github/celery/django-celery-beat/coverage.svg?branch=master
+    :target: https://codecov.io/github/celery/django-celery-beat?branch=master
+
+.. |license| image:: https://img.shields.io/pypi/l/django-celery-beat.svg
+    :alt: BSD License
+    :target: https://opensource.org/licenses/BSD-3-Clause
+
+.. |wheel| image:: https://img.shields.io/pypi/wheel/django-celery-beat.svg
+    :alt: django-celery-beat can be installed via wheel
+    :target: http://pypi.python.org/pypi/django-celery-beat/
+
+.. |pyversion| image:: https://img.shields.io/pypi/pyversions/django-celery-beat.svg
+    :alt: Supported Python versions.
+    :target: http://pypi.python.org/pypi/django-celery-beat/
+
+.. |pyimp| image:: https://img.shields.io/pypi/implementation/django-celery-beat.svg
+    :alt: Support Python implementations.
+    :target: http://pypi.python.org/pypi/django-celery-beat/
+
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..8677155
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,53 @@
+environment:
+
+  global:
+    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
+    # /E:ON and /V:ON options are not enabled in the batch script intepreter
+    # See: http://stackoverflow.com/a/13751649/163740
+    WITH_COMPILER: "cmd /E:ON /V:ON /C .\\extra\\appveyor\\run_with_compiler.cmd"
+
+  matrix:
+
+    # Pre-installed Python versions, which Appveyor may upgrade to
+    # a later point release.
+    # See: http://www.appveyor.com/docs/installed-software#python
+
+    - PYTHON: "C:\\Python27"
+      PYTHON_VERSION: "2.7.x"
+      PYTHON_ARCH: "32"
+
+    - PYTHON: "C:\\Python34"
+      PYTHON_VERSION: "3.4.x"
+      PYTHON_ARCH: "32"
+
+    - PYTHON: "C:\\Python27-x64"
+      PYTHON_VERSION: "2.7.x"
+      PYTHON_ARCH: "64"
+      WINDOWS_SDK_VERSION: "v7.0"
+
+    - PYTHON: "C:\\Python34-x64"
+      PYTHON_VERSION: "3.4.x"
+      PYTHON_ARCH: "64"
+      WINDOWS_SDK_VERSION: "v7.1"
+
+
+init:
+  - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
+
+install:
+  - "powershell extra\\appveyor\\install.ps1"
+  - "%PYTHON%/Scripts/pip.exe install -U setuptools"
+
+build: off
+
+test_script:
+  - "%WITH_COMPILER% %PYTHON%/python setup.py test"
+
+after_test:
+  - "%WITH_COMPILER% %PYTHON%/python setup.py bdist_wheel"
+
+artifacts:
+  - path: dist\*
+
+#on_success:
+#  - TODO: upload the content of dist/*.whl to a public wheelhouse
diff --git a/django_celery_beat/__init__.py b/django_celery_beat/__init__.py
new file mode 100644
index 0000000..15d021f
--- /dev/null
+++ b/django_celery_beat/__init__.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+"""Database-backed Periodic Tasks."""
+# :copyright: (c) 2016, Ask Solem.
+#             All rights reserved.
+# :license:   BSD (3 Clause), see LICENSE for more details.
+
+from __future__ import absolute_import, unicode_literals
+
+import re
+
+from collections import namedtuple
+
+__version__ = '1.0.1'
+__author__ = 'Ask Solem'
+__contact__ = 'ask at celeryproject.org'
+__homepage__ = 'https://github.com/celery/django-celery-beat'
+__docformat__ = 'restructuredtext'
+
+# -eof meta-
+
+version_info_t = namedtuple('version_info_t', (
+    'major', 'minor', 'micro', 'releaselevel', 'serial',
+))
+
+# bumpversion can only search for {current_version}
+# so we have to parse the version here.
+_temp = re.match(
+    r'(\d+)\.(\d+).(\d+)(.+)?', __version__).groups()
+VERSION = version_info = version_info_t(
+    int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or '', '')
+del(_temp)
+del(re)
+
+__all__ = []
diff --git a/django_celery_beat/admin.py b/django_celery_beat/admin.py
new file mode 100644
index 0000000..08b4d85
--- /dev/null
+++ b/django_celery_beat/admin.py
@@ -0,0 +1,145 @@
+"""Periodic Task Admin interface."""
+from __future__ import absolute_import, unicode_literals
+
+from django import forms
+from django.conf import settings
+from django.contrib import admin
+from django.forms.widgets import Select
+from django.utils.translation import ugettext_lazy as _
+
+from celery import current_app
+from celery.utils import cached_property
+from kombu.utils.json import loads
+
+from .models import PeriodicTask, IntervalSchedule, CrontabSchedule
+from .utils import is_database_scheduler
+
+try:
... 3106 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django-celery-beat.git



More information about the Python-modules-commits mailing list