summaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-11-06 17:44:42 +0100
committerantirez <antirez@gmail.com>2019-11-06 17:44:42 +0100
commit0f026af185e918a9773148f6ceaa1b084662be88 (patch)
treed9b2dd0956f80c042070bc05a5eb81bac0a162d4 /src/server.c
parent8b2c0f90442c0646d7265ef150dd5afa3172b86e (diff)
parenta15a5d70976cc185389b0d515265b443e5a3a0f3 (diff)
downloadredis-0f026af185e918a9773148f6ceaa1b084662be88.tar.gz
Merge branch 'unstable' of github.com:/antirez/redis into unstable
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server.c b/src/server.c
index acf8eebbc..113d92cbb 100644
--- a/src/server.c
+++ b/src/server.c
@@ -2065,6 +2065,12 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
server.rdb_bgsave_scheduled = 0;
}
+ /* Fire the cron loop modules event. */
+ RedisModuleCronLoopV1 ei = {REDISMODULE_CRON_LOOP_VERSION,server.hz};
+ moduleFireServerEvent(REDISMODULE_EVENT_CRON_LOOP,
+ 0,
+ &ei);
+
server.cronloops++;
return 1000/server.hz;
}
@@ -3697,6 +3703,9 @@ int prepareForShutdown(int flags) {
}
}
+ /* Fire the shutdown modules event. */
+ moduleFireServerEvent(REDISMODULE_EVENT_SHUTDOWN,0,NULL);
+
/* Remove the pid file if possible and needed. */
if (server.daemonize || server.pidfile) {
serverLog(LL_NOTICE,"Removing the pid file.");
@@ -4782,7 +4791,7 @@ void loadDataFromDisk(void) {
serverLog(LL_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
} else {
rdbSaveInfo rsi = RDB_SAVE_INFO_INIT;
- if (rdbLoad(server.rdb_filename,&rsi) == C_OK) {
+ if (rdbLoad(server.rdb_filename,&rsi,RDBFLAGS_NONE) == C_OK) {
serverLog(LL_NOTICE,"DB loaded from disk: %.3f seconds",
(float)(ustime()-start)/1000000);