Skip to content

Commit

Permalink
[HWKMETRICS-648] changes based on PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
John Sanda committed Apr 20, 2017
1 parent fbe4a7a commit 45f64c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Expand Up @@ -197,16 +197,16 @@ private void maybeScheduleMetricExpirationJob(List<JobDetails> backgroundJobs) {

//Get start of next day
long nextStart = DateTimeService.current24HourTimeSlice().plusDays(1).getMillis();
JobDetails JobDetails = scheduler.scheduleJob(DeleteExpiredMetrics.JOB_NAME, DeleteExpiredMetrics.JOB_NAME,
JobDetails jobDetails = scheduler.scheduleJob(DeleteExpiredMetrics.JOB_NAME, DeleteExpiredMetrics.JOB_NAME,
ImmutableMap.of(), new RepeatingTrigger.Builder().withTriggerTime(nextStart)
.withInterval(this.metricExpirationJobFrequencyInDays, TimeUnit.DAYS).build())
.toBlocking().value();
backgroundJobs.add(JobDetails);
configurationService.save(configId, jobIdConfigKey, JobDetails.getJobId().toString()).toBlocking();
backgroundJobs.add(jobDetails);
configurationService.save(configId, jobIdConfigKey, jobDetails.getJobId().toString()).toBlocking();
configurationService.save(configId, jobFrequencyKey, this.metricExpirationJobFrequencyInDays + "")
.toBlocking();

logger.info("Created and scheduled " + JobDetails);
logger.info("Created and scheduled " + jobDetails);
}
}

Expand Down
Expand Up @@ -93,7 +93,7 @@ public void initClass() {
@BeforeMethod(alwaysRun = true)
public void initMethod() {
session.execute("TRUNCATE tenants");
// session.execute("TRUNCATE data");
session.execute("TRUNCATE data");
session.execute("TRUNCATE data_compressed");
session.execute("TRUNCATE metrics_idx");
session.execute("TRUNCATE retentions_idx");
Expand Down
Expand Up @@ -876,8 +876,6 @@ private JobDetails createJobDetails(UUID jobId, String jobType, String jobName,
Trigger trigger) {
return jobsService.createJobDetails(jobId, jobType, jobName, parameters, trigger,
new Date(trigger.getTriggerTime()));
// return new JobDetails(jobId, jobType, jobName, new JobParametersImpl(parameters, DEFAULT_SAVE_PARAMS),
// trigger);
}

private class TestLatch extends CountDownLatch {
Expand Down

0 comments on commit 45f64c7

Please sign in to comment.