Fix gibjob

This commit is contained in:
Dominic Zimmer 2020-07-08 00:50:33 +02:00
parent bdf9d150a6
commit e64786bb30
2 changed files with 8 additions and 1 deletions

View File

@ -511,7 +511,11 @@ function enqueueForJob2()
rednet.send(server, "gibjob")
_, job, _ = rednet.receive()
if message then
return tonumber(job)
if message != "nojobs" then
return tonumber(job)
else
sleep(3)
end
else
if not retrying then
retrying = true

View File

@ -31,6 +31,9 @@ while true do
job = getNextJob()
rednet.send(receiver, tostring(job))
print("Found job request. Offering "..tostring(job))
else
rednet.send(receiver, "nojobs")
print("Found job request. Rejecting...")
end
elseif message == "report" then
_, job, _ = rednet.receive()