Nix daemon: respect build timeout from the client
This commit is contained in:
parent
08d96ffad0
commit
934cf2d1f4
2 changed files with 5 additions and 4 deletions
|
@ -3231,7 +3231,7 @@ void Worker::waitForInput()
|
||||||
after - before >= (time_t) settings.buildTimeout)
|
after - before >= (time_t) settings.buildTimeout)
|
||||||
{
|
{
|
||||||
printMsg(lvlError,
|
printMsg(lvlError,
|
||||||
format("%1% timed out after %2% seconds of activity")
|
format("%1% timed out after %2% seconds")
|
||||||
% goal->getName() % settings.buildTimeout);
|
% goal->getName() % settings.buildTimeout);
|
||||||
goal->cancel();
|
goal->cancel();
|
||||||
}
|
}
|
||||||
|
|
|
@ -551,7 +551,10 @@ static void performOp(unsigned int clientVersion,
|
||||||
for (unsigned int i = 0; i < n; i++) {
|
for (unsigned int i = 0; i < n; i++) {
|
||||||
string name = readString(from);
|
string name = readString(from);
|
||||||
string value = readString(from);
|
string value = readString(from);
|
||||||
settings.set("untrusted-" + name, value);
|
if (name == "build-timeout")
|
||||||
|
string2Int(value, settings.buildTimeout);
|
||||||
|
else
|
||||||
|
settings.set("untrusted-" + name, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startWork();
|
startWork();
|
||||||
|
@ -895,8 +898,6 @@ static void daemonLoop()
|
||||||
|
|
||||||
void run(Strings args)
|
void run(Strings args)
|
||||||
{
|
{
|
||||||
bool daemon = false;
|
|
||||||
|
|
||||||
for (Strings::iterator i = args.begin(); i != args.end(); ) {
|
for (Strings::iterator i = args.begin(); i != args.end(); ) {
|
||||||
string arg = *i++;
|
string arg = *i++;
|
||||||
if (arg == "--daemon") /* ignored for backwards compatibility */;
|
if (arg == "--daemon") /* ignored for backwards compatibility */;
|
||||||
|
|
Loading…
Reference in a new issue