aboutsummaryrefslogtreecommitdiff
path: root/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-08-24 16:09:54 +0200
committerStefan Boberg <[email protected]>2021-08-24 16:09:54 +0200
commit786e814b95d8dab99cc1020c889741f996c89972 (patch)
tree661a0e7f3a0bea8ff6fed7b513095a7028b7d2bb /zenserver/zenserver.cpp
parentMerge branch 'main' of https://github.com/EpicGames/zen (diff)
downloadzen-786e814b95d8dab99cc1020c889741f996c89972.tar.xz
zen-786e814b95d8dab99cc1020c889741f996c89972.zip
WIP interface for submitting workers/jobs
Diffstat (limited to 'zenserver/zenserver.cpp')
-rw-r--r--zenserver/zenserver.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index d9f72ed12..8c2fcf35d 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -54,6 +54,7 @@
#include "admin/admin.h"
#include "cache/kvcache.h"
#include "cache/structuredcache.h"
+#include "compute/apply.h"
#include "diag/diagsvcs.h"
#include "experimental/usnjournal.h"
#include "projectstore.h"
@@ -115,6 +116,10 @@ public:
zen::CreateDirectories(SandboxDir);
m_HttpLaunchService = std::make_unique<zen::HttpLaunchService>(*m_CasStore, SandboxDir);
+ std::filesystem::path ApplySandboxDir = m_DataRoot / "exec" / "apply";
+ zen::CreateDirectories(ApplySandboxDir);
+ m_HttpFunctionService = std::make_unique<zen::HttpFunctionService>(*m_CasStore, ApplySandboxDir);
+
m_CidStore = std::make_unique<zen::CidStore>(*m_CasStore, m_DataRoot / "cid");
if (ServiceConfig.LegacyCacheEnabled)
@@ -169,6 +174,11 @@ public:
{
m_Http.AddEndpoint(*m_HttpLaunchService);
}
+
+ if (m_HttpFunctionService)
+ {
+ m_Http.AddEndpoint(*m_HttpFunctionService);
+ }
}
void StartMesh(int BasePort)
@@ -296,6 +306,7 @@ private:
HttpAdminService m_AdminService;
HttpHealthService m_HealthService;
zen::Mesh m_ZenMesh{m_IoContext};
+ std::unique_ptr<zen::HttpFunctionService> m_HttpFunctionService;
bool m_DebugOptionForcedCrash = false;
};