Skip to content

Commit

Permalink
Merge branch 'sbn-migration' of https://github.com/Netflix/Priam into…
Browse files Browse the repository at this point in the history
… sbn-migration
  • Loading branch information
chengw-netflix committed Apr 11, 2023
2 parents 373069a + f65d37c commit c27e286
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -100,7 +100,10 @@ public void addTaskWithDelay(
}

public void runTaskNow(Class<? extends Task> taskclass) throws Exception {
jobFactory.guice.getInstance(taskclass).execute(null);
// Create a new instance of the task using reflection
Task taskInstance = taskclass.getConstructor().newInstance();
// Call the execute method on the instance
taskInstance.execute(null);
}

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

0 comments on commit c27e286

Please sign in to comment.