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

Allow to start the Quartz scheduler in halted mode #14122

Merged
merged 4 commits into from
Jan 6, 2021

Conversation

gsmet
Copy link
Member

@gsmet gsmet commented Jan 5, 2021

Supersedes #14043

/cc @nragon @machi1990

@ghost ghost added the area/scheduler label Jan 5, 2021
@ghost ghost added the area/core label Jan 5, 2021
@gsmet gsmet added this to the 1.11 - master milestone Jan 5, 2021
@gsmet gsmet changed the title Allow to start the Quartz scheduler halted Allow to start the Quartz scheduler in standby Jan 6, 2021
@gsmet
Copy link
Member Author

gsmet commented Jan 6, 2021

@mkouba I applied your suggestions and renamed halted to standby. Should be good to go now.

@nragon
Copy link
Contributor

nragon commented Jan 6, 2021

@gsmet (note) not to be confused with quartz standby mode (which can affect behavior on resuming a trigger)

@gsmet
Copy link
Member Author

gsmet commented Jan 6, 2021

@nragon so you're saying renaming it to standby is a bad idea?

From my tests, the Quartz scheduler was in standby mode on startup.

@mkouba
Copy link
Contributor

mkouba commented Jan 6, 2021

@gsmet (note) not to be confused with quartz standby mode (which can affect behavior on resuming a trigger)

Hm, that's actually a good point. So standby means started but temporarily halted.

By the way, the current io.quarkus.quartz.runtime.QuartzScheduler.isRunning() implementation does not reflect the new start mode because previously an enabled scheduler was always started.

@mkouba
Copy link
Contributor

mkouba commented Jan 6, 2021

@nragon so you're saying renaming it to standby is a bad idea?

From my tests, the Quartz scheduler was in standby mode on startup.

It's paused by default (until started): https://github.com/quartz-scheduler/quartz/blob/master/quartz-core/src/main/java/org/quartz/core/QuartzSchedulerThread.java#L123

@gsmet
Copy link
Member Author

gsmet commented Jan 6, 2021

By the way, the current io.quarkus.quartz.runtime.QuartzScheduler.isRunning() implementation does not reflect the new start mode because previously an enabled scheduler was always started.

Not sure I understand that? isRunning() returns false if we set the start mode to halted.

@gsmet gsmet changed the title Allow to start the Quartz scheduler in standby Allow to start the Quartz scheduler in halted mode Jan 6, 2021
@gsmet
Copy link
Member Author

gsmet commented Jan 6, 2021

Went back to halted then.

@mkouba
Copy link
Contributor

mkouba commented Jan 6, 2021

By the way, the current io.quarkus.quartz.runtime.QuartzScheduler.isRunning() implementation does not reflect the new start mode because previously an enabled scheduler was always started.

Not sure I understand that? isRunning() returns false if we set the start mode to halted.

Yeah, it works because isInStandbyMode() returns true by default - see #14122 (comment)

@nragon
Copy link
Contributor

nragon commented Jan 6, 2021

I was just mentioning that the standby action on quartz implies notifying both job store and listeners.
For me halted means that scheduler was not put on hold but the start was delayed for some reason.

@gsmet
Copy link
Member Author

gsmet commented Jan 6, 2021

@nragon yes, makes sense. I went back to your original proposal, sorry for the noise.

@gsmet gsmet merged commit 57e014d into quarkusio:master Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants