提交 53db09e2 编写于 作者: S stephenconnolly

Make the slave availability strategy actually do stuff!

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9354 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a3fe9ae9
......@@ -22,7 +22,7 @@ public abstract class SlaveAvailabilityStrategy implements Describable<SlaveAvai
public long check(Slave slave, State state) {
Slave.ComputerImpl c = slave.getComputer();
if (c != null && c.isOffline() && c.isStartSupported())
c.tryReconnect();
c.tryReconnect();
return 5;
}
......
......@@ -206,17 +206,18 @@ public abstract class Trigger<J extends Item> implements Describable<Trigger<?>>
public static final Timer timer = new Timer("Hudson cron thread");
public static void init() {
timer.scheduleAtFixedRate(new Cron(), 1000*60, 1000*60/*every minute*/);
long MIN = 1000*60;
long HOUR =60*MIN;
long DAY = 24*HOUR;
timer.scheduleAtFixedRate(new Cron(), MIN, MIN);
new DoubleLaunchChecker().schedule();
// clean up fingerprint once a day
long MIN = 1000*60;
long HOUR =60*MIN;
long DAY = 24*HOUR;
timer.scheduleAtFixedRate(new FingerprintCleanupThread(),DAY,DAY);
timer.scheduleAtFixedRate(new WorkspaceCleanupThread(),DAY+4*HOUR,DAY);
timer.scheduleAtFixedRate(new SlaveReconnectionWork(),15*MIN,5*MIN);
timer.scheduleAtFixedRate(new SlaveReconnectionWork(),15*MIN,1*MIN);
// start monitoring nodes, although there's no hurry.
timer.schedule(new SafeTimerTask() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册