summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2014-04-09 10:53:27 +0000
committerIan Delaney <idella4@gentoo.org>2014-04-09 10:53:27 +0000
commit73ad34018bc0a58dbd1814e64ece82b6d2afabd4 (patch)
tree9f2109d8d85ca4554048924daa4264767065e350 /dev-python/celery
parentAdd proxy-maintainers herd as a fallback for when maintainer is absent, leave... (diff)
downloadhistorical-73ad34018bc0a58dbd1814e64ece82b6d2afabd4.tar.gz
historical-73ad34018bc0a58dbd1814e64ece82b6d2afabd4.tar.bz2
historical-73ad34018bc0a58dbd1814e64ece82b6d2afabd4.zip
bump; add IUSE redis, optional flag for tests, py3 support, update test phase, new initd and confd files submitted by S. Talpalru in Bug #505492, initially masked for further testing
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64 Manifest-Sign-Key: 0xB8072B0D
Diffstat (limited to 'dev-python/celery')
-rw-r--r--dev-python/celery/ChangeLog10
-rw-r--r--dev-python/celery/Manifest14
-rw-r--r--dev-python/celery/celery-3.1.10.ebuild77
-rw-r--r--dev-python/celery/files/celery.confd-r150
-rw-r--r--dev-python/celery/files/celery.initd-r1214
-rw-r--r--dev-python/celery/metadata.xml1
6 files changed, 360 insertions, 6 deletions
diff --git a/dev-python/celery/ChangeLog b/dev-python/celery/ChangeLog
index 7b7d7f7ca6bb..453dd38e6b46 100644
--- a/dev-python/celery/ChangeLog
+++ b/dev-python/celery/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/celery
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/ChangeLog,v 1.29 2014/03/30 09:16:47 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/ChangeLog,v 1.30 2014/04/09 10:52:50 idella4 Exp $
+
+*celery-3.1.10 (09 Apr 2014)
+
+ 09 Apr 2014; Ian Delaney <idella4@gentoo.org> +celery-3.1.10.ebuild,
+ +files/celery.confd-r1, +files/celery.initd-r1, metadata.xml:
+ bump; add IUSE redis, optional flag for tests, py3 support, update test phase,
+ new initd and confd files submitted by S. Talpalru in Bug #505492, initially
+ masked for further testing
30 Mar 2014; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Drop maintainer as talked with him (#398377)
diff --git a/dev-python/celery/Manifest b/dev-python/celery/Manifest
index 431a0a2b3515..163df3c88798 100644
--- a/dev-python/celery/Manifest
+++ b/dev-python/celery/Manifest
@@ -5,7 +5,9 @@ AUX celery-3.0.11-require-python-dateutil-2.1.patch 1219 SHA256 6803b6aa70eef403
AUX celery-3.0.12-require-python-dateutil-2.1.patch 1221 SHA256 cf6aadb6c44b78ccd235ad4ba4e4b22034a9054f1f561de1b6bd9d59d5d49b4b SHA512 31fe2428ba80b4ca58ad5d13590945b0e0c71b090aa162a2c1062f8c5f4da8293606408ab16c99951f56880414c3a153b53c77f8b48859d790c48f36c11556da WHIRLPOOL caf13426644d12ec752bc282fe9c6483c042b368b4db367f037abe373ecd9ef729bb752fc91105448c850a59c2b948b3a54d1df6b88b2f37282aeee4f641f39b
AUX celery-docs.patch 779 SHA256 7fe9c7458abc6dd62f076c5904cf219aec2e42425758e59881d786e1536c5039 SHA512 813d3a772ce0ab19854519915f770d5785371f9d8b0c916e93a286383c4262f0c6a9e554c5d76fc0d81e53efbdc8ed4a7a7009ae07c71489e30464d7b0de6ef1 WHIRLPOOL 4935c4c8d812e486e33b33d67913a91c2c86c0093ed4f4b8aa808ad191c2c3aa427ae52c1c8357a5a8c36cbe1d77185f5b28332f3762589740240704e6a3902f
AUX celery.confd 1860 SHA256 33d824dee40c01f79ea177b7e574a7e061e943fe728426760030ae3faeaecb1c SHA512 7d7389f3c3201f7d00e7183c2f2eeae52ef64495114c08fb19e0425909019fa6470df5687d7fa6992d5ef1e2905fecbe79e1ea8e1d08f56bf7bee38377735acb WHIRLPOOL 71e14e0bcc3a7d65f5eb8d70cadbf3fbcb13cdb30436bdf112e5c0e86420c5a51192bd2514bac76319524f5d6d0de192801319afe5bf2d5f23c2d17968af1275
+AUX celery.confd-r1 1377 SHA256 91971f917a1e282a59ec24e1488d469c2e2aea96def79c20ad8133731dd75f57 SHA512 3f1e1292ba20c146d4986f7aaaf2a93e62188eb4a8a515742938bbe4414f19b1f1402c047b7737e967caadadb445cca3d36c5e60fe4d9c165383c9e80a76226f WHIRLPOOL 2aa4ff3d2ed957e93e07fbce9508e1be926bfbc3c3db61ac3d74bb3cd1baa19973ebe43abeadaf770610bdea6c9da3dedb74d81f4bf79d488c6128c86dd062aa
AUX celery.initd 6031 SHA256 aa47afffac71e7d12875e0f9d4b50d58e629d7c075a22ddd99e4e60a6e384ab4 SHA512 f7b4c0dc72fdd2a8920dea193cfba24c3cf340e27cb6fa5439bccd82364a48ebdd0cff86c1d3abf0fc1a448ec794d86370b58b2e1da81a6bd7d2062bad6b6975 WHIRLPOOL 91b2093ad31d1c1ba24688d51191df05fec90e6e96e3b28912e94c177834f6db5767e922742a1d60a9323fde85b76fb372d87fd1ac96c16ea76ef38aaefae42a
+AUX celery.initd-r1 4517 SHA256 0290d85573051af630e043fc3f8c9a1d88a30af24e4086813564e89c647dfaf0 SHA512 82a3d73a4ca364e030103dd16cb60507eabd64ccd6e7586589fefb7f9f9373f6cc360873f0a96af4a71020a7e575b7df2ca8db7c15b0ccd74836f0eb302e4142 WHIRLPOOL dcc4dc1437689651fce54d997a82e2247cd4ccdc28f7aaf3341c2a36b2bf65c82d23f5b1844f0ac3dafffe3f4b20b4d718ea5cf95158eceeed546f32c427f256
DIST celery-3.0.12.tar.gz 1218262 SHA256 716a465327ded5048893d518eafdade5eb09eb9d941e6efdbdaaac73b0251d3d SHA512 4ce7da636b52b0f87d46444c27ac1c6ba2e6afc1cd3378829e1a01c01f18adf6ed91e64e08ff19a52833071df58dbf6d452ffcfd008a4fe1ce57ccbff0bb0ed6 WHIRLPOOL 5d045eb19394d09b6816d60a745508565d75775b814225939ee9e252b0690cca2b4b73850a970ba98a6c3ad21bede1747d297b7a8e757bb0cb8d366ced275650
DIST celery-3.0.13.tar.gz 1223019 SHA256 1a8d045c94bfda832db2afbc786e8c99ac0e094d6019a5d89c8adfe04f396d6a SHA512 20bfa638893497f1bbb29859fa0b6f488341aa07d0243da7a713642b9723825de7f747dca09d0f5544dddc7b9595775e947ce247d03204f4080be51d5e3a4955 WHIRLPOOL ac699c0900631138247fccf0de4f13ed8f508e3edb2c5fd01582d36e96ebbdb80bdd9fae00b9c2984f6088cf14cda30114335ebdc1afc5a8da3981a3e541bffe
DIST celery-3.0.14.tar.gz 1229097 SHA256 57006a6e477282a2e55ace498729bf13218ac2c7ad5d9d920ad86b2469458df2 SHA512 df98a4a5661a005ed295339f527aef15e7d25c625904bb60bf3e305f40136c21ecd30d557cffe71b1888214e28099205df31e56e26d1d698e4b1366c11cbb722 WHIRLPOOL 29e984da6d5120ac31f04e5bf789ed1163d0726351725921d8c776a2fea1dd10e83a64a9979149f3bd2690884908f3963c7caa0374e49ca33fc7098aed8dda57
@@ -14,6 +16,7 @@ DIST celery-3.0.16.tar.gz 1233799 SHA256 31dc01e2e9c52825419d760422de7a6ce6fc789
DIST celery-3.0.17.tar.gz 1235117 SHA256 554d1e0c7cd8346aa372bb7f2b971441eee8e192a6a3855c89bad4d33b7bd947 SHA512 b426dc0e06efb4d9bccaaad57368ffedae275f758a5f6325b4aa78646b68620e381389a52d2f84d5d007269089230ac349620a021986e0fafd8acee1a1e55ecc WHIRLPOOL 38e8e412e1a419dcbd9874c9e17a17443bf6377c1b6d98fe76c53020042033edf4696021edaa04baaafe3c3acc3b4fa88c36a414ea3f99cafc74cfe520793563
DIST celery-3.0.19.tar.gz 1242004 SHA256 70ce2ff1143d964378b3e50817366256a036e78422e85cd89724d5e6ef022e55 SHA512 e6401adeafd1fe5e69a99bf69fe2a1a7ffe033d24fdec2732d5f564c7026cda78ca5fa1a8dfd3cebc9d4879e15e77b5b54018c4b6ba9f65db92d44ed99dcb178 WHIRLPOOL f47d5cdfb56e9695aff470d7966a920d95e03ce19a0af4e56cfb7d88e47b9cb78f4a8ae41efa789cb0de4e1675d8b1098dfb52adceadea4eaeb24efd6281ce83
DIST celery-3.0.21.tar.gz 1094747 SHA256 c1a76a94ba0d766630678df4912e211dc916f73143a189f8a6e37148ad2ffa53 SHA512 d6ef29a8cfad6016935398d3df7639dd06f5e47159b08550e7a83a80cc2d00da6ef2e284ffc1bde4c7e1d5f1213c83b17097c8d62a39ab390f300a4d4d22f39a WHIRLPOOL 29a4af9dcc99797ccdb8e4db022dd6688ddb1f1656e9fdaa5f06d4b109d2adda305f72a8089a418be0422d117f8edbf3b42e698eaa0633c81c9d4c1ea5719d57
+DIST celery-3.1.10.tar.gz 1287618 SHA256 0c292e17d439db20e10e07dd78ef51ec1d748af78cf247b69ee02bbce4923d36 SHA512 fa818db8a839516f2d54590d3d9e834eb16f7acb2e49373d79cec460af1b4d6a34ea4a2b9ceab8b40d964f608768dccc4a2286ac29f8bc4ec5691b90aa250c23 WHIRLPOOL 0db911c0c593d4a09c621d1e2b9a2b1aaa24884e965bb11c14c3380112e548a2fcc72404f6aaf8374d03b624efdcc0d17dcebb43280a78c5f720b75792f2ebb8
EBUILD celery-3.0.12.ebuild 2406 SHA256 87034140505821bc000872c78af237d232e5658353c1e5f1be1cee696f99b7c9 SHA512 f1b437618936d8d23769fe227a6724a0d50b4371d0ce3146ac7c33008d3270de92df78e543804bbe4dfbe059f2b5bcc146951ec58efaa9035acf4191ce125457 WHIRLPOOL 89f59dba35c5ef2f4a39c60faf7c6a292d31e024a35eb3c0674102d68855ce87656b6b5eb1ca27473c726eca625b1ccdbb5e46f554fdacdd27477a2589663674
EBUILD celery-3.0.13.ebuild 2326 SHA256 c2f7ecf80e494a56eccd65bcf5f8ef6294d6b7b9e20cb8fc5cd5a4a1c725a208 SHA512 26a8e2151da8b8964ba3484b7777d8a2875f45851abbf3ad4a39e9ddc19d9cf0220d4cb04c355a0d8be22425a53dfb0680ea51c00938f5bdb0896073d5275e97 WHIRLPOOL 3297a43ed89330ce05ca3285f3833a18989eacf7194bdc6a152563dae9fb9793d5da332d59b66f93d01cb5efb26e3cf034089f7e1e46eedd99bcb33c89a16c6a
EBUILD celery-3.0.14-r1.ebuild 2329 SHA256 be942d939221fd8599dc17daf7107ab78fbeac48b861f4ef732beaf9910744c4 SHA512 be1a251101ebc7543197a5b718f74d4c42b05d42695e4b2ba5e0cc48327082c429d628b10db2dee8903d28c527a32ac377a1e8a1734b1184fc09ff04bc1724c3 WHIRLPOOL a2c961e4541794accb0e9a33a1e9cc0f9ae54cbe97e42ed4a1844e6a47bffdf4ab6d89a66403cef19618a33f735a6b62d0d498873fb0e032483b07912bebc740
@@ -22,12 +25,13 @@ EBUILD celery-3.0.16.ebuild 2326 SHA256 69a19a63c2a7020787614de14c25c15d76f5d4b1
EBUILD celery-3.0.17.ebuild 2326 SHA256 e1f606fb2bf9d35b70e48029f8d1d0ef5d68cb11e19b370c7217269ddc12499a SHA512 a3f38cd63a08fdd6e29a70a416f00499c331fc9efb0ade827cfeeb722efe62dba27c942e92e534e4b23104f21b6cb36e8139e033aa84dee124256d86cc33c5ca WHIRLPOOL 0ca6f1973d058cee843e3efa9d2cb021e0b75e89f5ed50e28011e035239226416e8fbbe01803b9297368b0dec08e55f9c26ac6575f9fd8c3232e7b6fa844303e
EBUILD celery-3.0.19.ebuild 2395 SHA256 30b24eb659930edbb7b3334965ff73a27a83f0159a1dfa598f394c2321973bc2 SHA512 1229d425c5d276cfdac72cd2700566a8a0d3c65e29e7b442f5aff3bf8ff160af0ea6bfd31c5ff4557b41c07a3e7e6f6fa9067dc39cd47337a24f731602b1ed2f WHIRLPOOL d0b9023e9b1d1cfef89adb10bde70b5977a66c1068d246589b6a836e62008979c2c62f58b9badba4dab1d83f2806d907fd99e776d52e76913be29162e0af0ea0
EBUILD celery-3.0.21.ebuild 2395 SHA256 98304dd19a8ad6544702753a432176671951bd2ae0815d44f20a4b4d7efcfec3 SHA512 009a54cd9b1eb59326b62dc2e89ca356df50b2844839879a34cb32ee14b62989fc44ed259bf4250edddee4efd04facc6b1ae16d406a3bf940fe882a98e0125c5 WHIRLPOOL 59be02430dc19ab44c685bed5084a5b473e7902a9ea2480ee12a07e9ca46a7f23f23d10a1f482bbcfef65f7356ad361f4982ba8ee2d702b89316959e8a46c7ea
-MISC ChangeLog 4853 SHA256 3ba7fdcf095a9f0a77031454e04de8e5c01c7472dafec69af285f4a65f14f266 SHA512 5d14797ab227c03cda01be6f44e42a0f593796ac29879037aed5d83424272a6091c2f017ecf98449fe2b52244dd7257fb3ea99831de5980ecc85316b2a0ecc86 WHIRLPOOL 8ac59fd2261bfc4e3fb65e1809545032173bc556dbe59d65e9ec35fdb30f0881d5120024d99f1b985bc68eafa358d2dd22b9b9004d19922485e28d552ede4f00
-MISC metadata.xml 287 SHA256 efab6c97e46226ac6f21aa11b1e632a6174e29b9d2a932ecc39958ed72774779 SHA512 badb5f3f4cdaef1c8657adac223a6f06d8df4b8234fd3a6c3356467afea64cdb5f2886ccf604211b4ac610bd78f4387fc13f13646f5ecc345e81f70cbcf4f1e1 WHIRLPOOL 7ed0f543be9c46157a07a20a526a38675978496575632dcc056711d5124216fe28755652eb5b640d4dfa33034ebc3f777eb0f69d7b38204857250b842c7380b4
+EBUILD celery-3.1.10.ebuild 2316 SHA256 0570236a998011e37510bc731196162beca7de38f26ee9fa2b741418fb58e376 SHA512 06c21f54ee1fa474e47bf2060a9598e4771107f2bb5c2c35a45531b40ca8dc77e813a7b8151e61665310b6edc80852d36c88b63a6afcbd2fa841fe720a5ab072 WHIRLPOOL 03d68caf04f955b97859783d700b7f437399ef1f11be873a7af6da800b2d297ed3c72c6af35079f878401eb355616c79490297ed7c437cba39ee8c0c8d1b615c
+MISC ChangeLog 5210 SHA256 11e40bfddf8e0893e77ebf4b63e38e044771c33fe7147f0c21a92f647dd55d3b SHA512 3b46c6ea6039138f1e25342bac1e5fc75f43c1b3008ce5e2a6cd530c0e2df750b34c951da1e56d7183ccee1277bb7fe941667ba0c616c81eedb1d4b50e681937 WHIRLPOOL 7c13ba4ae986131dc14dc3a67b935c5113c1024eb5c2bb4d9b616067c6772d6d58c7073e4d2c84e66b7b257a37f06d0424e55b5618131596722fd27db80b97d2
+MISC metadata.xml 337 SHA256 eaa4f67043b6768b8e9780428d478af5ce978550d1e525d51cfe7c9c8129c4ea SHA512 0d11efc64238d61565d354e7cd58a0a13a83397426f358e2625daa6d81fa101bf4390789834cc6a1818656794e3b25bd71485662c16d644d5caedfac624b5be7 WHIRLPOOL b804d28878153c55f6bc0af8d17ab349f1be3cc4f49c23e446cb919d5fe3a2da23867bd1dc22b305ee0881440fcb40c7d70860e98b0d26973536ec89c351a316
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iEYEAREIAAYFAlM34QAACgkQCaWpQKGI+9TNbACfYlushfj3x2s+o3xA67lUQMEA
-Wh8An2iIFsO90RTGqfBJ0EqidXDRzL6c
-=4ZaE
+iEYEAREIAAYFAlNFJNMACgkQso7CE7gHKw2tdgCgzr7iclTQ2rzd3MP2S+QVMoDB
+vQoAoOJmnQ01LMFZKmr9cjBoxwx0GFY5
+=tQZt
-----END PGP SIGNATURE-----
diff --git a/dev-python/celery/celery-3.1.10.ebuild b/dev-python/celery/celery-3.1.10.ebuild
new file mode 100644
index 000000000000..4e1722a82528
--- /dev/null
+++ b/dev-python/celery/celery-3.1.10.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/celery-3.1.10.ebuild,v 1.1 2014/04/09 10:52:50 idella4 Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3} )
+
+inherit distutils-r1
+
+DESCRIPTION="Celery is an open source asynchronous task queue/job queue based on distributed message passing."
+HOMEPAGE="http://celeryproject.org/ http://pypi.python.org/pypi/celery"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples redis test"
+
+PY2_USEDEP=$(python_gen_usedep python2_7)
+RDEPEND="<dev-python/kombu-4
+ >=dev-python/kombu-3.0.14[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
+ >=dev-python/anyjson-0.3.3[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ >=dev-python/billiard-3.3.0.14[${PYTHON_USEDEP}]
+ <dev-python/billiard-3.4[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/gevent[${PY2_USEDEP}]
+ >=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
+ virtual/python-unittest2[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/nose-cover3[${PYTHON_USEDEP}]
+ dev-python/sqlalchemy[${PYTHON_USEDEP}]
+ dev-python/pymongo[${PYTHON_USEDEP}]
+ redis? ( dev-python/redis-py[${PYTHON_USEDEP}]
+ >=dev-db/redis-2.8.0 )
+ )
+ doc? (
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/sqlalchemy[${PYTHON_USEDEP}] )"
+
+PATCHES=( "${FILESDIR}"/celery-docs.patch )
+
+python_compile_all() {
+ if use doc; then
+ mkdir docs/.build || die
+ emake -C docs html
+ fi
+}
+
+python_test() {
+ # https://github.com/celery/celery/issues/1964
+ if python_is_python3; then
+ nosetests -e test_get_task_meta_for -e test_cleanup -e test_restore_group \
+ || die "Tests failed with ${EPYTHON}"
+ else
+ nosetests -e test_cleanup || die "Tests failed with ${EPYTHON}"
+ fi
+}
+
+python_install_all() {
+ # Main celeryd init.d and conf.d
+ newinitd "${FILESDIR}/celery.initd-r1" celery
+ newconfd "${FILESDIR}/celery.confd-r1" celery
+
+ use examples && local EXAMPLES=( examples/. )
+
+ use doc && local HTML_DOCS=( docs/.build/html/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/celery/files/celery.confd-r1 b/dev-python/celery/files/celery.confd-r1
new file mode 100644
index 000000000000..17254e840d12
--- /dev/null
+++ b/dev-python/celery/files/celery.confd-r1
@@ -0,0 +1,50 @@
+# /etc/conf.d/celery
+
+##############################################################################
+# GLOBAL CONFIGURATION
+
+# User and group
+#CELERY_USER="celery"
+#CELERY_GROUP="celery"
+
+# This is generaly a good idea to set the environment correctly
+# because a lot of python package try to use HOME on init
+#export HOME="/var/lib/myproject"
+
+# Full path to the python project directory.
+#CELERY_PROJDIR="/var/lib/myproject"
+
+##############################################################################
+# CELERYD
+
+#CELERYD_ENABLED="yes"
+
+# celeryd notes
+#CELERYD_NODES="celery"
+
+# celeryd options
+# Example: set a 5 minute hard time limit for tasks, disable queue process prefetching and specify an app module from CELERY_PROJDIR
+#CELERYD_OPTS="--time-limit=300 -Ofair -A celeryapp"
+
+# Location and level of the celeryd log file
+#CELERYD_LOG_FILE=/var/log/celery/celeryd@%n.log
+#CELERYD_LOG_LEVEL="INFO"
+
+# Location of the celeryd pid file
+#CELERYD_PID_FILE=/var/run/celery/celeryd@%n.pid
+
+##############################################################################
+# CELERYBEAT
+
+#CELERYBEAT_ENABLED="yes"
+
+# celerybeat options
+#CELERYBEAT_OPTS=""
+
+# Location and level of the celerybeat log file
+#CELERYBEAT_LOG_FILE=/var/log/celery/celerybeat.log
+#CELERYBEAT_LOG_LEVEL="INFO"
+
+# Location of the celerybeat pid file
+#CELERYBEAT_PID_FILE=/var/run/celery/celerybeat.pid
+
diff --git a/dev-python/celery/files/celery.initd-r1 b/dev-python/celery/files/celery.initd-r1
new file mode 100644
index 000000000000..a8b1adf3a7a8
--- /dev/null
+++ b/dev-python/celery/files/celery.initd-r1
@@ -0,0 +1,214 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the BSD license
+# $Header: /var/cvsroot/gentoo-x86/dev-python/celery/files/celery.initd-r1,v 1.1 2014/04/09 10:52:50 idella4 Exp $
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use rabbitmq redis logger dns
+}
+
+CELERYD_ENABLED=${CELERYD_ENABLED:-"no"}
+CELERYD_PID_FILE=${CELERYD_PID_FILE:-"/var/run/celery/celeryd@%n.pid"}
+CELERYD_LOG_FILE=${CELERYD_LOG_FILE:-"/var/log/celery/celeryd@%n.log"}
+CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-"INFO"}
+CELERYD_NODES=${CELERYD_NODES:-"celery"}
+
+CELERYBEAT_ENABLED=${CELERYBEAT_ENABLED:-"no"}
+CELERYBEAT_PID_FILE=${CELERYBEAT_PID_FILE:-"/var/run/celery/celerybeat.pid"}
+CELERYBEAT_LOG_FILE=${CELERYBEAT_LOG_FILE:-"/var/log/celery/celerybeat.log"}
+CELERYBEAT_LOG_LEVEL=${CELERYBEAT_LOG_LEVEL:-"INFO"}
+
+export CELERY_LOADER
+
+CELERYD_MULTI=${CELERYD_MULTI:-"celery multi"}
+CELERYCTL=${CELERYCTL:-"celery"}
+CELERYBEAT=${CELERYBEAT:-"celery beat"}
+
+CELERYD_OPTS="$CELERYD_OPTS"
+CELERYBEAT_OPTS="$CELERYBEAT_OPTS -f $CELERYBEAT_LOG_FILE -l $CELERYBEAT_LOG_LEVEL"
+
+create_dirs() {
+ local logfile="$1"
+ local pidfile="$2"
+ local logdir=$(dirname $logfile)
+ local piddir=$(dirname $pidfile)
+
+ checkpath -d -q -m 0750 -o ${CELERY_USER:-"root"}:${CELERY_GROUP:-"root"} $logdir $piddir
+}
+
+if [ -n "$CELERY_USER" ]; then
+ DAEMON_OPTS="$DAEMON_OPTS --uid=$CELERY_USER"
+fi
+if [ -n "$CELERY_GROUP" ]; then
+ DAEMON_OPTS="$DAEMON_OPTS --gid=$CELERY_GROUP"
+fi
+
+checkconfig() {
+ if [ ! -c /dev/null ]; then
+ eerror "/dev/null is not a character device!"
+ return 1
+ fi
+
+ if [ -z "$CELERY_PROJDIR" ]; then
+ eerror "Missing CELERY_PROJDIR variable"
+ return 1
+ fi
+
+ if yesno "$CELERYD_ENABLED"; then
+ create_dirs "$CELERYD_LOG_FILE" "$CELERYD_PID_FILE"
+ fi
+
+ if yesno "$CELERYBEAT_ENABLED"; then
+ create_dirs "$CELERYBEAT_LOG_FILE" "$CELERYBEAT_PID_FILE"
+ fi
+
+ return 0
+}
+
+celery_chdir() {
+ if [ -n "$CELERY_PROJDIR" ]; then
+ cd "$CELERY_PROJDIR"
+ fi
+}
+
+wait_pid () {
+ local pidfile=$1
+ local timeout=${STOPTIMEOUT:-"10"}
+ local PID=$(cat "${pidfile}" 2>/dev/null)
+
+ while [[ -n "$PID" && "${timeout}" -ge 1 ]] ; do
+ kill -0 $PID 2>/dev/null || break
+ kill -TERM "$PID"
+ timeout=$(($timeout - 1))
+ sleep 0.5
+ done
+
+ [[ "${timeout}" -lt 1 ]] && return 1
+ [ -f $pidfile ] && rm -f $pidfile
+ return 0
+}
+
+# celeryd
+start_workers() {
+ yesno "${CELERYD_ENABLED}" || return 0
+
+ $CELERYD_MULTI start $CELERYD_NODES $DAEMON_OPTS \
+ --pidfile="$CELERYD_PID_FILE" \
+ --logfile="$CELERYD_LOG_FILE" \
+ --loglevel="$CELERYD_LOG_LEVEL" \
+ $CELERYD_OPTS
+}
+
+stop_workers() {
+ yesno "${CELERYD_ENABLED}" || return 0
+
+ local timeout=${STOPTIMEOUT:-"10"}
+
+ $CELERYD_MULTI stop $CELERYD_NODES --pidfile="$CELERYD_PID_FILE" || return 1
+
+ # Wait for each node
+ for node in $CELERYD_NODES; do
+ local pidfile=${CELERYD_PID_FILE/\%n/$node}
+ local PID=$(cat "${pidfile}" 2>/dev/null)
+ while [[ -n "$PID" && "${timeout}" -ge 1 ]] ; do
+ kill -0 $PID 2>/dev/null || break
+ timeout=$(($timeout - 1))
+ sleep 0.5
+ done
+ done
+
+ [[ "${timeout}" -lt 1 ]] && return 1
+ return 0
+}
+
+restart_workers() {
+ yesno "${CELERYD_ENABLED}" || return 0
+
+ $CELERYD_MULTI restart $CELERYD_NODES $DAEMON_OPTS \
+ --pidfile="$CELERYD_PID_FILE" \
+ --logfile="$CELERYD_LOG_FILE" \
+ --loglevel="$CELERYD_LOG_LEVEL" \
+ $CELERYD_OPTS
+}
+
+# celerybeat
+start_beat() {
+ yesno "${CELERYBEAT_ENABLED}" || return 0
+
+ ebegin "Starting celerybeat"
+ $CELERYBEAT $CELERYBEAT_OPTS $DAEMON_OPTS --detach \
+ --pidfile="$CELERYBEAT_PID_FILE"
+ eend $?
+}
+
+
+stop_beat() {
+ yesno "${CELERYBEAT_ENABLED}" || return 0
+
+ ebegin "Stopping celerybeat"
+ if [ -f "$CELERYBEAT_PID_FILE" ]; then
+ wait_pid "$CELERYBEAT_PID_FILE"
+ else
+ ewarn "not running"
+ fi
+ eend $?
+}
+
+
+start() {
+ local cr=0
+
+ checkconfig || return 1
+
+ ebegin "Starting ${SVCNAME}"
+ eindent
+
+ celery_chdir && \
+ start_workers && \
+ start_beat || cr=1
+
+ eoutdent
+ eend $cr
+}
+
+stop() {
+ local cr=0
+
+ checkconfig || return 1
+
+ ebegin "Stopping ${SVCNAME}"
+ eindent
+
+ celery_chdir
+ stop_workers || cr=1
+ stop_beat || cr=1
+
+ eoutdent
+ eend $cr
+}
+
+reload() {
+ local cr=0
+
+ checkconfig || return 1
+
+ ebegin "Restarting ${SVCNAME}"
+ eindent
+
+ celery_chdir
+ restart_workers || cr=1
+ stop_beat && start_beat || cr=1
+
+ eoutdent
+ eend $cr
+}
+
+status() {
+ checkconfig || return 1
+
+ celery_chdir && \
+ ${CELERYCTL} status
+}
diff --git a/dev-python/celery/metadata.xml b/dev-python/celery/metadata.xml
index 3e274c9cffeb..41cd42cebd31 100644
--- a/dev-python/celery/metadata.xml
+++ b/dev-python/celery/metadata.xml
@@ -7,5 +7,6 @@
</upstream>
<use>
<flag name='sql'>Adds SQL support</flag>
+ <flag name='redis'>Enables redis support</flag>
</use>
</pkgmetadata>