aboutsummaryrefslogtreecommitdiff
path: root/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-11-03 09:25:09 +0100
committerMartin Ridgers <[email protected]>2021-11-03 09:25:09 +0100
commit55a0f5047c069c82e741ecc917e65827377fcda9 (patch)
tree2d0ac1e3e89ccfb70256c1d6a2a4613d2aaf7c69 /zenserver/zenserver.cpp
parentMissing include (diff)
downloadzen-55a0f5047c069c82e741ecc917e65827377fcda9.tar.xz
zen-55a0f5047c069c82e741ecc917e65827377fcda9.zip
Wrapped /apply/ and /exec/ services in a ZEN_WITH_COMPUTE_SERVICES define
Diffstat (limited to 'zenserver/zenserver.cpp')
-rw-r--r--zenserver/zenserver.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index 37b841a3f..06f3911ec 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -222,6 +222,7 @@ public:
m_HttpProjectService.reset(new zen::HttpProjectService{*m_CidStore, m_ProjectStore});
m_LocalProjectService = zen::LocalProjectService::New(*m_CasStore, m_ProjectStore);
+#if ZEN_WITH_COMPUTE_SERVICES
ZEN_INFO("instantiating compute services");
std::filesystem::path SandboxDir = m_DataRoot / "exec" / "sandbox";
@@ -231,6 +232,7 @@ public:
std::filesystem::path ApplySandboxDir = m_DataRoot / "exec" / "apply";
zen::CreateDirectories(ApplySandboxDir);
m_HttpFunctionService = std::make_unique<zen::HttpFunctionService>(*m_CasStore, *m_CidStore, ApplySandboxDir);
+#endif // ZEN_WITH_COMPUTE_SERVICES
if (ServiceConfig.StructuredCacheEnabled)
{
@@ -268,6 +270,7 @@ public:
m_Http->RegisterService(*m_StructuredCacheService);
}
+#if ZEN_WITH_COMPUTE_SERVICES
if (m_HttpLaunchService)
{
m_Http->RegisterService(*m_HttpLaunchService);
@@ -277,6 +280,7 @@ public:
{
m_Http->RegisterService(*m_HttpFunctionService);
}
+#endif // ZEN_WITH_COMPUTE_SERVICES
m_FrontendService = std::make_unique<HttpFrontendService>(m_ContentRoot);
@@ -506,13 +510,15 @@ private:
zen::HttpCasService m_CasService{*m_CasStore};
zen::RefPtr<zen::ProjectStore> m_ProjectStore;
zen::Ref<zen::LocalProjectService> m_LocalProjectService;
- std::unique_ptr<zen::HttpLaunchService> m_HttpLaunchService;
std::unique_ptr<zen::HttpProjectService> m_HttpProjectService;
std::unique_ptr<zen::HttpStructuredCacheService> m_StructuredCacheService;
zen::HttpAdminService m_AdminService;
zen::HttpHealthService m_HealthService;
zen::Mesh m_ZenMesh{m_IoContext};
+#if ZEN_WITH_COMPUTE_SERVICES
+ std::unique_ptr<zen::HttpLaunchService> m_HttpLaunchService;
std::unique_ptr<zen::HttpFunctionService> m_HttpFunctionService;
+#endif
std::unique_ptr<zen::HttpFrontendService> m_FrontendService;
bool m_DebugOptionForcedCrash = false;