Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Purpose of getDisconnectToleration() function that always only return 0 #4511

LuongChu ·

Hello@robinshen ,
We are checking issue related to disconnection of build agent during build and foud that
In com.pmease.quickbuild.grid.GridJob class, I found getDisconnectToleration() function that always only return 0.
protected int getDisconnectToleration() {
return 0;
}

in run()
if (getDisconnectToleration() == 0 || now.getTime() - getLastDisconnectDate().getTime() > getDisconnectToleration()*1000L) {
logger.error("Error connecting task node '" + taskNode.getAddress() + "', will cancel running job...", e);
cancel();
}

Could you please help to explain the purpose of this getDisconnectToleration() function?
Thank you for your time.

  • replies 3
  • views 522
  • stars 0
robinshen ADMIN ·

Use 0 means to cancel build as long as there is an exception detected. This method will be overriden in StepAwareJob to return user specified value.

LuongChu ·

In StepAwareJob
@Override
protected int getDisconnectToleration() {
return Integer.parseInt(getStep().getDisconnectTolerance());
}

It means that the DisconnectTolerance is configured by user in each Step? And If we set it is 0 (get Disconnection), the job will be cancelled if any exception occurs (network error, build agent disconnected ...) ?

robinshen ADMIN ·

That is true.