Add simple Redis Server which is only capable of doing publish / subscribe. New ws redis_server sub-command to use it. The server is used in the unittest, so that we can run on CI in environment where redis isn not available like github actions env.
This commit is contained in:
@ -243,6 +243,10 @@ int main(int argc, char** argv)
|
||||
autobahnApp->add_option("--url", url, "url");
|
||||
autobahnApp->add_flag("-q", quiet, "Quiet");
|
||||
|
||||
CLI::App* redisServerApp = app.add_subcommand("redis_server", "Redis server");
|
||||
redisServerApp->add_option("--port", port, "Port");
|
||||
redisServerApp->add_option("--host", hostname, "Hostname");
|
||||
|
||||
CLI11_PARSE(app, argc, argv);
|
||||
|
||||
// pid file handling
|
||||
@ -364,6 +368,10 @@ int main(int argc, char** argv)
|
||||
{
|
||||
ret = ix::ws_autobahn_main(url, quiet);
|
||||
}
|
||||
else if (app.got_subcommand("redis_server"))
|
||||
{
|
||||
ret = ix::ws_redis_server_main(port, hostname);
|
||||
}
|
||||
|
||||
ix::uninitNetSystem();
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user