unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: services: Add redis-service
Date: Thu, 12 Jan 2017 16:49:04 +0100	[thread overview]
Message-ID: <871sw81dov.fsf@gnu.org> (raw)
In-Reply-To: <20170110072401.6756-1-mail@cbaines.net> (Christopher Baines's message of "Tue, 10 Jan 2017 07:24:01 +0000")

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Hi,

Christopher Baines <mail@cbaines.net> 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:


[-- Attachment #2: Type: text/x-patch, Size: 2031 bytes --]

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
-@code{redis-configuration} object.
+This is the service type for the @uref{https://redis.io/, 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 <davet@gnu.org>
 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -342,16 +343,15 @@ The optional @var{config} argument specifies the configuration for
 (define redis-shepherd-service
   (match-lambda
     (($ <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")
                           #$config-file)
                         #:user "redis"
                         #:group "redis"))

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]


Could you consider writing a system test for Redis?  See (gnu tests ssh)
and (gnu tests mail) for examples.

Thank you!

Ludo’.

  reply	other threads:[~2017-01-12 15:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10  7:24 [PATCH] gnu: services: Add redis-service Christopher Baines
2017-01-12 15:49 ` Ludovic Courtès [this message]
2017-01-13 14:22 ` Thompson, David
2017-01-13 14:42   ` David Craven
2017-01-13 14:56   ` John Darrington
2017-01-13 22:01   ` Ricardo Wurmus
2017-01-14 10:37     ` Hartmut Goebel
2017-01-14 13:40     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871sw81dov.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=mail@cbaines.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).