Skip to content

Commit

Permalink
Merge pull request #198 from DSL-UMD/distributed
Browse files Browse the repository at this point in the history
change time scheduler to MILLISECONDS
  • Loading branch information
gangliao authored Sep 26, 2019
2 parents 288d38d + 03d5119 commit dc747d8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ public void run() {
// Creates and executes a periodic action that becomes enabled first after the given initial
// delay (1s), and subsequently with the given delay (2s) between the termination of one
// execution and the commencement of the next.
long delay = 2L;
long delay = 300L;
String delayStr = System.getenv("UPDATE_DB_TIME_DELAY");
if (delayStr != null) {
delay = Long.parseLong(delayStr);
}

final ScheduledFuture<?> updateHandle =
scheduler.scheduleWithFixedDelay(updateToDB, 1, delay, SECONDS);
scheduler.scheduleWithFixedDelay(updateToDB, 100, delay, MILLISECONDS);

scheduler.schedule(
new Runnable() {
Expand Down

0 comments on commit dc747d8

Please sign in to comment.