Skip to content

Commit

Permalink
#2226 added pause between disk scans to decrease stress in RH
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilshat Aliev committed Feb 6, 2018
1 parent b77bdca commit 94e9a78
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package io.subutai.core.hubmanager.impl.requestor;


import java.util.concurrent.TimeUnit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -12,6 +14,7 @@
import io.subutai.common.peer.ContainerHost;
import io.subutai.common.peer.LocalPeer;
import io.subutai.common.settings.Common;
import io.subutai.common.util.TaskUtil;
import io.subutai.core.environment.api.EnvironmentManager;
import io.subutai.core.hubmanager.api.HubManager;
import io.subutai.core.hubmanager.api.HubRequester;
Expand Down Expand Up @@ -49,6 +52,9 @@ public void request() throws Exception
for ( ContainerDto container : environment.getContainers() )
{
checkDiskUsage( container );

//pause not to stress RH with disk usage checks
TaskUtil.sleep( TimeUnit.SECONDS.toMillis( 5 ) );
}
}
}
Expand Down

0 comments on commit 94e9a78

Please sign in to comment.