MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / redisSupervisedSystemd

Function redisSupervisedSystemd

src/server.cpp:7213–7225  ·  view source on GitHub ↗

Attempt to set up systemd supervision. Returns 1 if successful. */

Source from the content-addressed store, hash-verified

7211
7212/* Attempt to set up systemd supervision. Returns 1 if successful. */
7213static int redisSupervisedSystemd(void) {
7214#ifndef HAVE_LIBSYSTEMD
7215 serverLog(LL_WARNING,
7216 "systemd supervision requested or auto-detected, but Redis is compiled without libsystemd support!");
7217 return 0;
7218#else
7219 if (redisCommunicateSystemd("STATUS=Redis is loading...\n") <= 0)
7220 return 0;
7221 serverLog(LL_NOTICE,
7222 "Supervised by systemd. Please make sure you set appropriate values for TimeoutStartSec and TimeoutStopSec in your service unit.");
7223 return 1;
7224#endif
7225}
7226
7227int redisIsSupervised(int mode) {
7228 int ret = 0;

Callers 1

redisIsSupervisedFunction · 0.85

Calls 2

serverLogFunction · 0.85
redisCommunicateSystemdFunction · 0.85

Tested by

no test coverage detected