[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: services: Add redis-service

From: Ludovic Courtès
Subject: Re: [PATCH] gnu: services: Add redis-service
Date: Thu, 12 Jan 2017 16:49:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)


Christopher Baines <address@hidden> skribis:

> * gnu/services/database.scm (<redis-configuration>): New record type.
> (%redis-accounts, redis-service-type): New variables.
> (default-redis.conf, redis-activation, redis-shepherd-service): New
> procedures.
> * doc/guix.texi (Database Services): Document the new redis service.

Nice!  Applied with these changes:

diff --git a/doc/guix.texi b/doc/guix.texi
index de1ef2add..c495e39f4 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10332,8 +10332,8 @@ TCP port on which the database server listens for 
incoming connections.
 @end deftp
 @defvr {Scheme Variable} redis-service-type
-This is the type of the Redis service, whose value is a
address@hidden object.
+This is the service type for the @uref{, Redis}
+key/value store, whose value is a @code{redis-configuration} object.
 @end defvr
 @deftp {Data Type} redis-configuration
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index b6bdd6080..3ecc8aff7 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2015 David Thompson <address@hidden>
 ;;; Copyright © 2015, 2016 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2016 Leo Famulari <address@hidden>
+;;; Copyright © 2017 Christopher Baines <address@hidden>
 ;;; This file is part of GNU Guix.
@@ -342,16 +343,15 @@ The optional @var{config} argument specifies the 
configuration for
 (define redis-shepherd-service
     (($ <redis-configuration> redis bind port working-directory config-file)
-     (let
-         ((config-file
-           (or config-file
-               (default-redis.conf bind port working-directory))))
+     (let ((config-file
+            (or config-file
+                (default-redis.conf bind port working-directory))))
        (list (shepherd-service
               (provision '(redis))
               (documentation "Run the Redis daemon.")
               (requirement '(user-processes syslogd))
               (start #~(make-forkexec-constructor
-                        `(,(string-append #$redis "/bin/redis-server")
+                        '(#$(file-append redis "/bin/redis-server")
                         #:user "redis"
                         #:group "redis"))
Could you consider writing a system test for Redis?  See (gnu tests ssh)
and (gnu tests mail) for examples.

Thank you!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]