hydra/src/hydra-queue-runner/build-remote.hh

28 lines
792 B
C++
Raw Normal View History

#pragma once
#include "store-api.hh"
#include "derivations.hh"
#include "counter.hh"
#include "token-server.hh"
struct RemoteResult
{
enum {
rrSuccess = 0,
rrPermanentFailure = 1,
rrTimedOut = 2,
rrMiscFailure = 3
} status = rrMiscFailure;
std::string errorMsg;
time_t startTime = 0, stopTime = 0;
2015-06-19 14:51:59 +02:00
nix::Path logFile;
};
void buildRemote(std::shared_ptr<nix::StoreAPI> store,
const std::string & sshName, const std::string & sshKey,
const nix::Path & drvPath, const nix::Derivation & drv,
const nix::Path & logDir, unsigned int maxSilentTime, unsigned int buildTimeout,
2015-06-24 13:19:16 +02:00
TokenServer & copyClosureTokenServer, RemoteResult & result,
counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom);