N4IROACVZ4MU73J5SM6WXJMKQSFR3VN5SOKENNNZNEGMTGB2Q3HAC HJOEIMLRDVQ2KZI5HGL2HKGBM3AHP7YIKGKDAGFUNKRUXVRB24NAC 24BMQDZAWDQ7VNIA7TIROXSOYLOJBNZ2E4264WHWNJAEN6ZB3UOAC 5AIYUMTBY6TFQTBRP3MJ2PYWUMRF57I77NIVWYE74UMEVQMBWZVQC 7LB6QBXYOGU43UDLJDJQZFGT4XDALULXDF3WX3WWHL7X3JTB54CQC MB3TISH2KYBIGY6XJKMN4HO2S6TCN2GORJENMECCKLXGGIRS2O2AC GS4BE6TB6GH2JUZJHDPHL6YG7J7YYESF3YOZJZ2CFABXUTO4VYPQC HHOMBU7GGRAEXODSDY3WUHQGOSQ35OTGRNBWKKAS2D4YEIZTTNUAC LE4VZIY5VZ52FOP5QQRIJINWIMWTAPRTZTGO77JXUEPGRPRSQYMAC A2GL5FOZ3UJ2NM5RPRWTNPFTKLBA54B2UC6UIYO4M3N3RFNC4BTAC 7VQ4ALFYKJBFR46T3WZDMGOXNRR3QNJEJQVBYJM4HSJUOOUD6WBQC OCZ4LSGGSCMSLGC3C32D5JUYYHS5CIPOKOAMADEFAFZOFXJ3YY3AC 5LBMP7GAY5IIOX75M62BRGKXS4BNIQRDBCYLM4PHI773KRABTL2QC RYTQLATYOZ6ODIKYVJ63TC4OIQBXHSCV3NA2YD4NFP7443GQVSRQC #pragma once#include "store-api.hh"#include "derivations.hh"struct RemoteResult{enum {rrSuccess = 0,rrPermanentFailure = 1,rrTimedOut = 2,rrMiscFailure = 3} status = rrMiscFailure;std::string errorMsg;time_t startTime = 0, stopTime = 0;};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,TokenServer & copyClosureTokenServer, RemoteResult & result,counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom,counter & bytesSent, counter & bytesReceived);nix::Path logFile;#include "counter.hh"#include "token-server.hh"
void buildRemote(std::shared_ptr<StoreAPI> store,const string & sshName, const string & sshKey,const Path & drvPath, const Derivation & drv,const nix::Path & logDir, unsigned int maxSilentTime, unsigned int buildTimeout,TokenServer & copyClosureTokenServer, RemoteResult & result,counter & nrStepsBuilding, counter & nrStepsCopyingTo, counter & nrStepsCopyingFrom,counter & bytesSent, counter & bytesReceived)
void State::buildRemote(std::shared_ptr<StoreAPI> store,Machine::ptr machine, Step::ptr step,unsigned int maxSilentTime, unsigned int buildTimeout,RemoteResult & result)
if (sshName != "localhost") {printMsg(lvlDebug, format("copying outputs of ‘%1%’ from ‘%2%’") % drvPath % sshName);
if (machine->sshName != "localhost") {printMsg(lvlDebug, format("copying outputs of ‘%1%’ from ‘%2%’") % step->drvPath % machine->sshName);
buildRemote(store, machine->sshName, machine->sshKey, step->drvPath, step->drv,logDir, build->maxSilentTime, build->buildTimeout, copyClosureTokenServer,result, nrStepsBuilding, nrStepsCopyingTo, nrStepsCopyingFrom,bytesSent, bytesReceived);
buildRemote(store, machine, step, build->maxSilentTime, build->buildTimeout, result);