summaryrefslogtreecommitdiffstats
path: root/src/commands/shutdown.json
blob: a9e45d42d305a6347081fe24188886a530647c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
    "SHUTDOWN": {
        "summary": "Synchronously saves the database(s) to disk and shuts down the Redis server.",
        "complexity": "O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)",
        "group": "server",
        "since": "1.0.0",
        "arity": -1,
        "function": "shutdownCommand",
        "history": [
            [
                "7.0.0",
                "Added the `NOW`, `FORCE` and `ABORT` modifiers."
            ]
        ],
        "command_flags": [
            "ADMIN",
            "NOSCRIPT",
            "LOADING",
            "STALE",
            "NO_MULTI",
            "SENTINEL",
            "ALLOW_BUSY"
        ],
        "arguments": [
            {
                "name": "save-selector",
                "type": "oneof",
                "optional": true,
                "arguments": [
                    {
                        "name": "nosave",
                        "type": "pure-token",
                        "token": "NOSAVE"
                    },
                    {
                        "name": "save",
                        "type": "pure-token",
                        "token": "SAVE"
                    }
                ]
            },
            {
                "name": "now",
                "type": "pure-token",
                "token": "NOW",
                "optional": true,
                "since": "7.0.0"
            },
            {
                "name": "force",
                "type": "pure-token",
                "token": "FORCE",
                "optional": true,
                "since": "7.0.0"
            },
            {
                "name": "abort",
                "type": "pure-token",
                "token": "ABORT",
                "optional": true,
                "since": "7.0.0"
            }
        ],
        "reply_schema": {
            "description": "OK if ABORT was specified and shutdown was aborted. On successful shutdown, nothing is returned since the server quits and the connection is closed. On failure, an error is returned.",
            "const": "OK"
        }
    }
}