umustafi commented on code in PR #3737:
URL: https://github.com/apache/gobblin/pull/3737#discussion_r1294080873
##########
gobblin-runtime/src/main/java/org/apache/gobblin/scheduler/JobScheduler.java:
##########
@@ -586,9 +587,13 @@ public void close() throws IOException {
* Get a {@link org.quartz.Trigger} from the given job configuration
properties.
*/
public static Trigger createTriggerForJob(JobKey jobKey, Properties
jobProps) {
- // Build a trigger for the job with the given cron-style schedule
+ Random random = new Random();
+ /*
+ Build a trigger for the job with the given cron-style schedule
+ Append a random integer to job name to be able to add multiple triggers
associated with the same job.
+ */
return TriggerBuilder.newTrigger()
- .withIdentity(jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY),
+ .withIdentity(jobProps.getProperty(ConfigurationKeys.JOB_NAME_KEY) +
random.nextInt(1000),
Review Comment:
updated with this!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]