aboutsummaryrefslogtreecommitdiff
path: root/zenserver/compute
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/compute')
-rw-r--r--zenserver/compute/apply.cpp18
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;
}