aboutsummaryrefslogtreecommitdiff
path: root/zen/cmds/run.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-06-17 07:06:21 -0700
committerGitHub <[email protected]>2022-06-17 07:06:21 -0700
commitc7e22a4ef1cce7103b9afbeec487461cb32f8dbe (patch)
tree8b99d51bf496c96f82161c18fbdcfd5c6f8f31fd /zen/cmds/run.cpp
parentfixed merge mistake which caused a build error (diff)
downloadarchived-zen-c7e22a4ef1cce7103b9afbeec487461cb32f8dbe.tar.xz
archived-zen-c7e22a4ef1cce7103b9afbeec487461cb32f8dbe.zip
Make cas storage an hidden implementation detail of CidStore (#130)v0.1.4-pre6v0.1.4-pre5
- Bumped ZEN_SCHEMA_VERSION - CasStore no longer a public API, it is hidden behind CidStore - Moved cas.h from public header folder - CidStore no longer maps from Cid -> Cas, we store entries in Cas under RawHash - CasStore now decompresses data to validate content (matching against RawHash) - CasChunkSet renames to HashKeySet and put in separate header/cpp file - Disabled "Chunk" command for now as it relied on CAS being exposed as a service - Changed CAS http service to Cid http server - Moved "Run" command completely inside ZEN_WITH_EXEC_SERVICES define - Removed "cas.basic" test - Uncommented ".exec.basic" test and added return-skip at start of test - Moved ScrubContext to separate header file - Renamed CasGC to GcManager - Cleaned up configuration passing in cas store classes - Removed CAS stuff from GcContext and clarified naming in class - Remove migration code
Diffstat (limited to 'zen/cmds/run.cpp')
-rw-r--r--zen/cmds/run.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/zen/cmds/run.cpp b/zen/cmds/run.cpp
index 0fde4648a..86e67b391 100644
--- a/zen/cmds/run.cpp
+++ b/zen/cmds/run.cpp
@@ -4,28 +4,30 @@
#include "run.h"
-#include <zencore/compactbinarybuilder.h>
-#include <zencore/except.h>
-#include <zencore/filesystem.h>
-#include <zencore/fmtutils.h>
-#include <zencore/iohash.h>
-#include <zencore/logging.h>
-#include <zencore/stream.h>
-#include <zencore/string.h>
-#include <zencore/timer.h>
-#include <zenutil/zenserverprocess.h>
-
-#include <filesystem>
+#if ZEN_WITH_EXEC_SERVICES
+
+# include <zencore/compactbinarybuilder.h>
+# include <zencore/except.h>
+# include <zencore/filesystem.h>
+# include <zencore/fmtutils.h>
+# include <zencore/iohash.h>
+# include <zencore/logging.h>
+# include <zencore/stream.h>
+# include <zencore/string.h>
+# include <zencore/timer.h>
+# include <zenutil/zenserverprocess.h>
+
+# include <filesystem>
ZEN_THIRD_PARTY_INCLUDES_START
-#include <cpr/cpr.h>
+# include <cpr/cpr.h>
ZEN_THIRD_PARTY_INCLUDES_END
-#if ZEN_PLATFORM_WINDOWS
-# pragma comment(lib, "Crypt32.lib")
-# pragma comment(lib, "Wldap32.lib")
-# pragma comment(lib, "Ws2_32.lib")
-#endif
+# if ZEN_PLATFORM_WINDOWS
+# pragma comment(lib, "Crypt32.lib")
+# pragma comment(lib, "Wldap32.lib")
+# pragma comment(lib, "Ws2_32.lib")
+# endif
//////////////////////////////////////////////////////////////////////////
@@ -156,7 +158,7 @@ RunCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
zen::IoBuffer FileData = zen::IoBufferBuilder::MakeFromFile(It->second);
cpr::Response CasResponse =
- cpr::Post(cpr::Url("http://localhost:13337/cas"), cpr::Body((const char*)FileData.Data(), FileData.Size()));
+ cpr::Post(cpr::Url("http://localhost:13337/cid"), cpr::Body((const char*)FileData.Data(), FileData.Size()));
if (CasResponse.status_code >= 300)
{
@@ -179,3 +181,5 @@ RunCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
}
} // namespace zen
+
+#endif // ZEN_WITH_EXEC_SERVICES