Skip to content

Commit

Permalink
Changed async timing units to seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Jul 24, 2023
1 parent 2f317da commit 6484719
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/java/jasper/component/scheduler/Async.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ String trackingQuery() {
}

@Scheduled(
fixedRateString = "${jasper.async-interval-min}",
initialDelayString = "${jasper.async-delay-min}",
timeUnit = TimeUnit.MINUTES)
fixedRateString = "${jasper.async-interval-sec}",
initialDelayString = "${jasper.async-delay-sec}",
timeUnit = TimeUnit.SECONDS)
public void drainAsyncTask() {
if (tags.isEmpty() && responses.isEmpty()) return;
for (var origin : props.getScrapeOrigins()) drain(origin);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/jasper/config/Props.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class Props {
private int ingestMaxRetry = 5;
private String[] modSeals;
private String[] editorSeals;
private String asyncDelayMin = "2";
private String asyncIntervalMin = "0.3";
private String asyncDelaySec = "120";
private String asyncIntervalSec = "40";
/**
* Whitelist origins to run async tasks on.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ server:
jasper:
replicate-delay-min: 0
replicate-interval-min: 1
async-delay-sec: 0
async-interval-sec: 6
scrape-delay-min: 5
scrape-interval-min: 5
# CORS is disabled by default on microservices, as you should access them through a gateway.
Expand Down

0 comments on commit 6484719

Please sign in to comment.