Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor name change in the PriamScheduler #1051

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
public class PriamScheduler {
private static final Logger logger = LoggerFactory.getLogger(PriamScheduler.class);
private final Scheduler scheduler;
private final PriamJobFactory jobProvider;
private final PriamJobFactory jobFactory;
private final Sleeper sleeper;

@Inject
public PriamScheduler(SchedulerFactory factory, PriamJobFactory jobProvider, Sleeper sleeper) {
public PriamScheduler(SchedulerFactory factory, PriamJobFactory jobFactory, Sleeper sleeper) {
try {
this.scheduler = factory.getScheduler();
this.scheduler.setJobFactory(jobProvider);
this.jobProvider = jobProvider;
this.scheduler.setJobFactory(jobFactory);
this.jobFactory = jobFactory;
} catch (SchedulerException e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -100,7 +100,7 @@ public void addTaskWithDelay(
}

public void runTaskNow(Class<? extends Task> taskclass) throws Exception {
jobProvider.newJob(taskclass).execute(null);
jobFactory.newJob(taskclass).execute(null);
}

public void deleteTask(String name) throws SchedulerException {
Expand Down