Skip to content

Commit 9facd2e

Browse files
author
Chen Zhiling
authored
Add pollingInterval config option (#565)
* Add pollingInterval config option * Add missing prefix * Increase polling interval
1 parent e8d6e99 commit 9facd2e

5 files changed

Lines changed: 6 additions & 2 deletions

File tree

core/src/main/java/feast/core/config/FeastProperties.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public static class JobProperties {
4545
public static class JobUpdatesProperties {
4646

4747
private long timeoutSeconds;
48+
private long pollingIntervalMillis;
4849
}
4950

5051
@Getter

core/src/main/java/feast/core/service/JobCoordinatorService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
@Service
5555
public class JobCoordinatorService {
5656

57-
private final long POLLING_INTERVAL_MILLISECONDS = 60000; // 1 min
5857
private JobRepository jobRepository;
5958
private FeatureSetRepository featureSetRepository;
6059
private SpecService specService;
@@ -87,7 +86,7 @@ public JobCoordinatorService(
8786
* <p>4) Updates Feature set statuses
8887
*/
8988
@Transactional
90-
@Scheduled(fixedDelay = POLLING_INTERVAL_MILLISECONDS)
89+
@Scheduled(fixedDelayString = "${feast.jobs.updates.pollingIntervalMillis}")
9190
public void Poll() throws InvalidProtocolBufferException {
9291
log.info("Polling for new jobs...");
9392
List<JobUpdateTask> jobUpdateTasks = new ArrayList<>();

core/src/main/resources/application.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ feast:
3131
# Key-value dict of job options to be passed to the population jobs.
3232
options: {}
3333
updates:
34+
# Job update polling interval in milliseconds: how often Feast checks if new jobs should be sent to the runner.
35+
pollingIntervalMillis: 60000
3436
# Timeout in seconds for each attempt to update or submit a new job to the runner.
3537
timeoutSeconds: 240
3638
metrics:

infra/scripts/test-end-to-end-batch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ feast:
120120
runner: DirectRunner
121121
options: {}
122122
updates:
123+
pollingIntervalMillis: 30000
123124
timeoutSeconds: 240
124125
metrics:
125126
enabled: false

infra/scripts/test-end-to-end.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ feast:
103103
runner: DirectRunner
104104
options: {}
105105
updates:
106+
pollingIntervalMillis: 30000
106107
timeoutSeconds: 240
107108
metrics:
108109
enabled: false

0 commit comments

Comments
 (0)