-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quartz + Scheduler: Allow to use config in Identity field #14993
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
LATCH.countDown(); | ||
if (IS_WATCHING.get()) { | ||
LATCH.countDown(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unrelated to my changes, but it was randomly failing for me. Using the is watching boolean, made the test more consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen this error before. Do you mind putting this in a separate commit / PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've deleted my changes here and let's see if the CI complains. If so, I will create a separate PR for this.
Thanks!
@machi1990 These changes allow to use confg values in the identity field which is important for Quartz. |
cebbf9b
to
b95c679
Compare
extensions/scheduler/runtime/src/main/java/io/quarkus/scheduler/runtime/SimpleScheduler.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sgitario thanks for the quick PR.
LGTM, I've added some comments. Can you have a look?
b95c679
to
e0ca905
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@mkouba can you have a look too?
extensions/scheduler/runtime/src/main/java/io/quarkus/scheduler/runtime/SimpleScheduler.java
Outdated
Show resolved
Hide resolved
@@ -188,13 +185,8 @@ SimpleTrigger createTrigger(String invokerClass, CronParser parser, Scheduled sc | |||
} | |||
} | |||
|
|||
// Keep it public so that we can reuse the logic in the quartz extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should extract these two static methods to a dedicated class? I'm not sure about the name though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the same approach in other extensions, I've created a SchedulerUtils
and moved these two methods and also some static methods that were part of the interface SchedulerContext
and were also related to configuration.
I left these methods as static but we could make them instance methods.
Let me know if it looks better now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current version looks perfect! Thanks.
e0ca905
to
2e4598c
Compare
2e4598c
to
5168dfb
Compare
These changes allow to use config properties in the
identity
field:Fix #14967