diff options
| author | Matt Peters <[email protected]> | 2022-01-10 10:57:59 -0700 |
|---|---|---|
| committer | Matt Peters <[email protected]> | 2022-01-10 10:57:59 -0700 |
| commit | 4a12683b27adb31bde9eb8f7df3b9e9cc8ec680a (patch) | |
| tree | c8b2939d400dd4bccae73d2782b15c65d30db19d /zenserver/compute/apply.cpp | |
| parent | Add WaitForQuiescence RPC (diff) | |
| parent | Two missing override keywords (diff) | |
| download | zen-wait_for_quiescence.tar.xz zen-wait_for_quiescence.zip | |
Merge branch 'main' into wait_for_quiescencewait_for_quiescence
Diffstat (limited to 'zenserver/compute/apply.cpp')
| -rw-r--r-- | zenserver/compute/apply.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp index d483fd4f7..95902a752 100644 --- a/zenserver/compute/apply.cpp +++ b/zenserver/compute/apply.cpp @@ -61,8 +61,6 @@ BasicFunctionJob::~BasicFunctionJob() bool BasicFunctionJob::SpawnJob(std::filesystem::path ExePath, std::wstring CommandLine) { - using namespace fmt::literals; - STARTUPINFOEX StartupInfo = {sizeof(STARTUPINFOEX)}; PROCESS_INFORMATION ProcessInfo{}; @@ -82,7 +80,7 @@ BasicFunctionJob::SpawnJob(std::filesystem::path ExePath, std::wstring CommandLi if (!Created) { - throw std::system_error(::GetLastError(), std::system_category(), "Failed to create process '{}'"_format(ExePath).c_str()); + throw std::system_error(::GetLastError(), std::system_category(), fmt::format("Failed to create process '{}'", ExePath).c_str()); } m_ProcessId = ProcessInfo.dwProcessId; @@ -714,7 +712,6 @@ CbPackage HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) { using namespace std::literals; - using namespace fmt::literals; std::filesystem::path SandboxPath = CreateNewSandbox(); @@ -735,12 +732,12 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::runtime_error("worker CAS chunk '{}' missing"_format(ChunkHash)); + throw std::runtime_error(fmt::format("worker CAS chunk '{}' missing", ChunkHash)); } if (DataBuffer.Size() != Size) { - throw std::runtime_error("worker CAS chunk '{}' size: {}, action spec expected {}"_format(ChunkHash, DataBuffer.Size(), Size)); + throw std::runtime_error(fmt::format("worker CAS chunk '{}' size: {}, action spec expected {}", ChunkHash, DataBuffer.Size(), Size)); } zen::WriteFile(FilePath, DataBuffer); @@ -766,12 +763,12 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::runtime_error("worker CAS chunk '{}' missing"_format(ChunkHash)); + throw std::runtime_error(fmt::format("worker CAS chunk '{}' missing", ChunkHash)); } if (DataBuffer.Size() != Size) { - throw std::runtime_error("worker CAS chunk '{}' size: {}, action spec expected {}"_format(ChunkHash, DataBuffer.Size(), Size)); + throw std::runtime_error(fmt::format("worker CAS chunk '{}' size: {}, action spec expected {}", ChunkHash, DataBuffer.Size(), Size)); } zen::WriteFile(FilePath, DataBuffer); @@ -790,7 +787,7 @@ HttpFunctionService::ExecAction(const WorkerDesc& Worker, CbObject Action) if (!DataBuffer) { - throw std::runtime_error("input CID chunk '{}' missing"_format(Cid)); + throw std::runtime_error(fmt::format("input CID chunk '{}' missing", Cid)); } zen::WriteFile(FilePath, DataBuffer); @@ -942,11 +939,10 @@ HttpFunctionService::ExecActionUpstream(const WorkerDesc& Worker, CbObject Actio HttpResponseCode HttpFunctionService::ExecActionUpstreamResult(const IoHash& WorkerId, const IoHash& ActionId, CbPackage& Package) { - using namespace fmt::literals; auto Status = m_UpstreamApply->GetStatus(WorkerId, ActionId); if (!Status.Success) { - // throw std::runtime_error("Action {}/{} not found"_format(WorkerId.ToHexString(), ActionId.ToHexString()).c_str()); + // throw std::runtime_error(fmt::format("Action {}/{} not found", WorkerId.ToHexString(), ActionId.ToHexString()).c_str()); return HttpResponseCode::NotFound; } |