diff options
| author | Per Larsson <[email protected]> | 2021-09-17 13:11:04 +0200 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-09-17 13:11:04 +0200 |
| commit | d812fcc3eab88733cbef084eefd089d22177aae4 (patch) | |
| tree | bb64fa6c64f9707246577de148749b35d1e25987 /zen/zen.cpp | |
| parent | Added helper function for iterating string tokens. (diff) | |
| parent | Added namespace scopes to more includes for better consistency (diff) | |
| download | archived-zen-d812fcc3eab88733cbef084eefd089d22177aae4.tar.xz archived-zen-d812fcc3eab88733cbef084eefd089d22177aae4.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zen/zen.cpp')
| -rw-r--r-- | zen/zen.cpp | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/zen/zen.cpp b/zen/zen.cpp index d8bfa13e5..6390c832f 100644 --- a/zen/zen.cpp +++ b/zen/zen.cpp @@ -42,6 +42,7 @@ ////////////////////////////////////////////////////////////////////////// + class TemplateCommand : public ZenCmdBase { public: @@ -94,29 +95,12 @@ private: int main(int argc, char** argv) { + using namespace zen; + mi_version(); zen::logging::InitializeLogging(); -#if TEST_UWS - /* Overly simple hello world app, using multiple threads */ - std::vector<std::thread*> threads(4); - - std::transform(threads.begin(), threads.end(), threads.begin(), [](std::thread* /*t*/) { - return new std::thread([]() { - uWS::App() - .get("/*", - [&](uWS::HttpResponse<false>* res, uWS::HttpRequest*) { - zen::Sleep(1); - res->end("hello, world!"); - }) - .listen(1337, [&](auto* listen_socket) { ZEN_UNUSED(listen_socket); }) - .run(); - }); - }); - - std::for_each(threads.begin(), threads.end(), [](std::thread* t) { t->join(); }); -#endif ////////////////////////////////////////////////////////////////////////// auto _ = zen::MakeGuard([] { spdlog::shutdown(); }); @@ -141,19 +125,21 @@ main(int argc, char** argv) ZenCmdBase* Cmd; const char* CmdSummary; } Commands[] = { - {"chunk", &ChunkCmd, "Perform chunking"}, - {"copy", &CopyCmd, "Copy file(s)"}, - {"deploy", &DeployCmd, "Deploy data"}, - {"dedup", &DedupCmd, "Dedup files"}, - {"drop", &DropCmd, "Drop cache bucket(s)"}, - {"hash", &HashCmd, "Compute file hashes"}, - {"runtests", &RunTestsCmd, "Run zen tests"}, - {"run", &RunCmd, "Remote execution"}, - {"status", &StatusCmd, "Show zen status"}, - {"ps", &PsCmd, "Enumerate running zen server instances"}, - {"top", &TopCmd, "Monitor zen server activity"}, - {"up", &UpCmd, "Bring zen server up"}, - {"down", &DownCmd, "Bring zen server down"}, + // clang-format off + {"chunk", &ChunkCmd, "Perform chunking"}, + {"copy", &CopyCmd, "Copy file(s)"}, + {"deploy", &DeployCmd, "Deploy data"}, + {"dedup", &DedupCmd, "Dedup files"}, + {"drop", &DropCmd, "Drop cache bucket(s)"}, + {"hash", &HashCmd, "Compute file hashes"}, + {"runtests", &RunTestsCmd, "Run zen tests"}, + {"run", &RunCmd, "Remote execution"}, + {"status", &StatusCmd, "Show zen status"}, + {"ps", &PsCmd, "Enumerate running zen server instances"}, + {"top", &TopCmd, "Monitor zen server activity"}, + {"up", &UpCmd, "Bring zen server up"}, + {"down", &DownCmd, "Bring zen server down"}, + // clang-format on }; // Build set containing available commands |