parent
7d8c99eb43
commit
906d56a96b
3 changed files with 9 additions and 1 deletions
|
@ -151,7 +151,7 @@ void RemoteStore::initConnection(Connection & conn)
|
||||||
conn.to << PROTOCOL_VERSION;
|
conn.to << PROTOCOL_VERSION;
|
||||||
|
|
||||||
if (GET_PROTOCOL_MINOR(conn.daemonVersion) >= 14) {
|
if (GET_PROTOCOL_MINOR(conn.daemonVersion) >= 14) {
|
||||||
int cpu = settings.lockCPU ? lockToCurrentCPU() : -1;
|
int cpu = sameMachine() && settings.lockCPU ? lockToCurrentCPU() : -1;
|
||||||
if (cpu != -1)
|
if (cpu != -1)
|
||||||
conn.to << 1 << cpu;
|
conn.to << 1 << cpu;
|
||||||
else
|
else
|
||||||
|
|
|
@ -29,6 +29,8 @@ public:
|
||||||
const Setting<unsigned int> maxConnectionAge{(Store*) this, std::numeric_limits<unsigned int>::max(),
|
const Setting<unsigned int> maxConnectionAge{(Store*) this, std::numeric_limits<unsigned int>::max(),
|
||||||
"max-connection-age", "number of seconds to reuse a connection"};
|
"max-connection-age", "number of seconds to reuse a connection"};
|
||||||
|
|
||||||
|
virtual bool sameMachine() = 0;
|
||||||
|
|
||||||
RemoteStore(const Params & params);
|
RemoteStore(const Params & params);
|
||||||
|
|
||||||
/* Implementations of abstract store API methods. */
|
/* Implementations of abstract store API methods. */
|
||||||
|
@ -146,6 +148,9 @@ public:
|
||||||
|
|
||||||
std::string getUri() override;
|
std::string getUri() override;
|
||||||
|
|
||||||
|
bool sameMachine()
|
||||||
|
{ return true; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
ref<RemoteStore::Connection> openConnection() override;
|
ref<RemoteStore::Connection> openConnection() override;
|
||||||
|
|
|
@ -35,6 +35,9 @@ public:
|
||||||
return uriScheme + host;
|
return uriScheme + host;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool sameMachine()
|
||||||
|
{ return false; }
|
||||||
|
|
||||||
void narFromPath(const Path & path, Sink & sink) override;
|
void narFromPath(const Path & path, Sink & sink) override;
|
||||||
|
|
||||||
ref<FSAccessor> getFSAccessor() override;
|
ref<FSAccessor> getFSAccessor() override;
|
||||||
|
|
Loading…
Reference in a new issue