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

Scheduler: run multiple scheduler implementations #42129

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Jul 25, 2024

@vsevel
Copy link
Contributor

vsevel commented Jul 25, 2024

excellent @mkouba
if I use multiple schedulers, how is defined the priority? is this the ordinal of the enum?
this means that today's Scheduled methods would continue running on the simple scheduler, whereas quartz would be used if explicitly specified in the executeWith attribute. correct?

@mkouba
Copy link
Contributor Author

mkouba commented Jul 25, 2024

if I use multiple schedulers, how is defined the priority? is this the ordinal of the enum?
this means that today's Scheduled methods would continue running on the simple scheduler, whereas quartz would be used if explicitly specified in the executeWith attribute. correct?

Not really. Currently, the quarkus-quartz provides an implementation with higher priority (see also SchedulerImplementationBuildItem). Which means that if you have something like @Scheduled(every = "1s") then Quartz will be used automatically. @Scheduled(every = "1s", executeWith = Implementation.SIMPLE) means "always use the simple in-memory scheduler". If you use @Scheduled(every = "1s", executeWith = Implementation.QUARTZ) and quarkus-quartz is not available then the build fails (this part is not implemented yet ;-).

@mkouba mkouba force-pushed the composite-scheduler branch from ed94790 to c421c37 Compare July 25, 2024 15:34
@mkouba
Copy link
Contributor Author

mkouba commented Jul 25, 2024

If you use @Scheduled(every = "1s", executeWith = Implementation.QUARTZ) and quarkus-quartz is not available then the build fails (this part is not implemented yet ;-).

It's implemented and tested now.

@melloware
Copy link
Contributor

Nice!

@mkouba mkouba marked this pull request as ready for review July 29, 2024 07:52
@mkouba mkouba requested a review from manovotn July 29, 2024 07:53

This comment has been minimized.

@mkouba mkouba force-pushed the composite-scheduler branch from c421c37 to 8ba2d86 Compare July 30, 2024 08:08

This comment has been minimized.

@mkouba mkouba force-pushed the composite-scheduler branch from 8ba2d86 to 9a053dc Compare July 30, 2024 12:29
@manovotn manovotn added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 30, 2024
@mkouba
Copy link
Contributor Author

mkouba commented Jul 30, 2024

@manovotn Thanks for approval. Still need to add some docs ;-)

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@mkouba mkouba removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 31, 2024
@mkouba
Copy link
Contributor Author

mkouba commented Jul 31, 2024

Do not merge yet, I have to add one more test for CompositeJobDefinition...

@mkouba mkouba force-pushed the composite-scheduler branch from b116e51 to d4bd15a Compare July 31, 2024 08:07
@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 31, 2024
Copy link

quarkus-bot bot commented Jul 31, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit d4bd15a.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

quarkus-bot bot commented Jul 31, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit d4bd15a.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest.testOTelInjections - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest was not fulfilled within 5 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest was not fulfilled within 5 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
	at io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest.reset(OpenTelemetryInjectionsTest.java:26)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

⚙️ JVM Tests - JDK 21

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest.testOTelInjections - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest was not fulfilled within 5 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest was not fulfilled within 5 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
	at io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest.reset(OpenTelemetryInjectionsTest.java:26)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

@mkouba mkouba merged commit e44a143 into quarkusio:main Jul 31, 2024
35 checks passed
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jul 31, 2024
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Jul 31, 2024
Copy link

🙈 The PR is closed and the preview is expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants