aboutsummaryrefslogtreecommitdiff
path: root/zen/zen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zen/zen.cpp')
-rw-r--r--zen/zen.cpp50
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