summary refs log tree commit diff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-09-01 14:12:55 +0200
committerMarius Bakke <marius@gnu.org>2020-09-22 18:41:56 +0200
commit8a88efce4c07d4519fe2e380dcb565d0ff1b11c2 (patch)
treed490054252a98267d5ed53c10f7dc2502896513d /gnu/packages/databases.scm
parent8c9365047b8ae041e6230ef5a72d6cf6f27a7521 (diff)
downloadguix-8a88efce4c07d4519fe2e380dcb565d0ff1b11c2.tar.gz
gnu: Add python-rq-scheduler.
* gnu/packages/databases.scm (python-rq-scheduler): New public variable.
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 9e7c31faf6..cb6cf688ff 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -3113,6 +3113,44 @@ is designed to have a low barrier to entry.")
 (define-public python2-rq
   (package-with-python2 python-rq))
 
+(define-public python-rq-scheduler
+  (package
+    (name "python-rq-scheduler")
+    (version "0.10.0")
+    (home-page "https://github.com/rq/rq-scheduler")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url home-page)
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0xg6yazqs5kbr2ayvhvljs1h5vgx5k5dds613fmhswln7gglf9hk"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (add-before 'check 'start-redis
+                    (lambda _
+                      (invoke "redis-server" "--daemonize" "yes")))
+                  (replace 'check
+                    (lambda _
+                      (substitute* "run_tests.py"
+                        (("/usr/bin/env")
+                         (which "env")))
+                      (invoke "./run_tests.py"))))))
+    (native-inputs
+     `(("redis" ,redis)
+       ("which" ,which)))
+    (propagated-inputs
+     `(("python-croniter" ,python-croniter)
+       ("python-rq" ,python-rq)))
+    (synopsis "Job scheduling capabilities for RQ (Redis Queue)")
+    (description
+     "This package provides job scheduling capabilities to @code{python-rq}
+(Redis Queue).")
+    (license license:expat)))
+
 (define-public python-trollius-redis
   (package
     (name "python-trollius-redis")