aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-10-11 10:03:54 +0200
committerGitHub <[email protected]>2023-10-11 10:03:54 +0200
commit1ad940fafb5e3eae7b308dd290b6de6ade69a3eb (patch)
tree1d1efe188f45bc422292e75c6784929765882771 /src/zenserver/zenserver.cpp
parentfix clang-format whoopsie (diff)
downloadzen-1ad940fafb5e3eae7b308dd290b6de6ade69a3eb.tar.xz
zen-1ad940fafb5e3eae7b308dd290b6de6ade69a3eb.zip
remove legacy compute interfaces (#461)
* removed legacy compute code, which will be replaced with a new implementation in the future * also updated references to Jupiter storage
Diffstat (limited to 'src/zenserver/zenserver.cpp')
-rw-r--r--src/zenserver/zenserver.cpp79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/zenserver/zenserver.cpp b/src/zenserver/zenserver.cpp
index 1f5c91a58..789952a3c 100644
--- a/src/zenserver/zenserver.cpp
+++ b/src/zenserver/zenserver.cpp
@@ -217,17 +217,6 @@ ZenServer::Initialize(const ZenServerOptions& ServerOptions, ZenServerState::Zen
m_ProjectStore = new ProjectStore(*m_CidStore, m_DataRoot / "projects", m_GcManager, *m_JobQueue);
m_HttpProjectService.reset(new HttpProjectService{*m_CidStore, m_ProjectStore, m_StatsService, *m_AuthMgr});
-#if ZEN_WITH_COMPUTE_SERVICES
- if (ServerOptions.ComputeServiceEnabled)
- {
- InitializeCompute(ServerOptions);
- }
- else
- {
- ZEN_INFO("NOT instantiating compute services");
- }
-#endif // ZEN_WITH_COMPUTE_SERVICES
-
if (ServerOptions.StructuredCacheConfig.Enabled)
{
InitializeStructuredCache(ServerOptions);
@@ -250,16 +239,6 @@ ZenServer::Initialize(const ZenServerOptions& ServerOptions, ZenServerState::Zen
m_Http->RegisterService(*m_CidService);
-#if ZEN_WITH_COMPUTE_SERVICES
- if (ServerOptions.ComputeServiceEnabled)
- {
- if (m_HttpFunctionService != nullptr)
- {
- m_Http->RegisterService(*m_HttpFunctionService);
- }
- }
-#endif // ZEN_WITH_COMPUTE_SERVICES
-
m_FrontendService = std::make_unique<HttpFrontendService>(m_ContentRoot);
if (m_FrontendService)
@@ -532,60 +511,6 @@ ZenServer::InitializeStructuredCache(const ZenServerOptions& ServerOptions)
m_Http->RegisterService(*m_UpstreamService);
}
-#if ZEN_WITH_COMPUTE_SERVICES
-void
-ZenServer::InitializeCompute(const ZenServerOptions& ServerOptions)
-{
- ServerOptions;
- const ZenUpstreamCacheConfig& UpstreamConfig = ServerOptions.UpstreamCacheConfig;
-
- // Horde compute upstream
- if (UpstreamConfig.HordeConfig.Url.empty() == false && UpstreamConfig.HordeConfig.StorageUrl.empty() == false)
- {
- ZEN_INFO("instantiating compute service");
-
- std::string_view EndpointName = UpstreamConfig.HordeConfig.Name.empty() ? "Horde"sv : UpstreamConfig.HordeConfig.Name;
-
- auto ComputeOptions =
- CloudCacheClientOptions{.Name = EndpointName,
- .ServiceUrl = UpstreamConfig.HordeConfig.Url,
- .ComputeCluster = UpstreamConfig.HordeConfig.Cluster,
- .ConnectTimeout = std::chrono::milliseconds(UpstreamConfig.ConnectTimeoutMilliseconds),
- .Timeout = std::chrono::milliseconds(UpstreamConfig.TimeoutMilliseconds)};
-
- auto ComputeAuthConfig = UpstreamAuthConfig{.OAuthUrl = UpstreamConfig.HordeConfig.OAuthUrl,
- .OAuthClientId = UpstreamConfig.HordeConfig.OAuthClientId,
- .OAuthClientSecret = UpstreamConfig.HordeConfig.OAuthClientSecret,
- .OpenIdProvider = UpstreamConfig.HordeConfig.OpenIdProvider,
- .AccessToken = UpstreamConfig.HordeConfig.AccessToken};
-
- auto StorageOptions =
- CloudCacheClientOptions{.Name = EndpointName,
- .ServiceUrl = UpstreamConfig.HordeConfig.StorageUrl,
- .BlobStoreNamespace = UpstreamConfig.HordeConfig.Namespace,
- .ConnectTimeout = std::chrono::milliseconds(UpstreamConfig.ConnectTimeoutMilliseconds),
- .Timeout = std::chrono::milliseconds(UpstreamConfig.TimeoutMilliseconds)};
-
- auto StorageAuthConfig = UpstreamAuthConfig{.OAuthUrl = UpstreamConfig.HordeConfig.StorageOAuthUrl,
- .OAuthClientId = UpstreamConfig.HordeConfig.StorageOAuthClientId,
- .OAuthClientSecret = UpstreamConfig.HordeConfig.StorageOAuthClientSecret,
- .OpenIdProvider = UpstreamConfig.HordeConfig.StorageOpenIdProvider,
- .AccessToken = UpstreamConfig.HordeConfig.StorageAccessToken};
-
- m_HttpFunctionService = std::make_unique<HttpFunctionService>(*m_CidStore,
- ComputeOptions,
- StorageOptions,
- ComputeAuthConfig,
- StorageAuthConfig,
- *m_AuthMgr);
- }
- else
- {
- ZEN_INFO("NOT instantiating compute service (missing Horde or Storage config)");
- }
-}
-#endif // ZEN_WITH_COMPUTE_SERVICES
-
void
ZenServer::Run()
{
@@ -679,10 +604,6 @@ ZenServer::Cleanup()
m_UpstreamCache.reset();
m_CacheStore = {};
-#if ZEN_WITH_COMPUTE_SERVICES
- m_HttpFunctionService.reset();
-#endif // ZEN_WITH_COMPUTE_SERVICES
-
m_HttpProjectService.reset();
m_ProjectStore = {};
m_CidService.reset();