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

Added config value to enable/disable Quartz scheduler on a server #13

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

maallen
Copy link
Member

@maallen maallen commented Aug 15, 2023

New configuration value allows the Quartz scheduler to be disabled on a node via an application.properties value. This will be utilised in the cluster separation to distinguish worker nodes and api nodes.

Added docker compose cluster that contains a single mysql DB alongside a mojito-api and mojito-worker service that can be used for testing the multi cluster configuration. Successfully sent a command via mojito-cli to an api node which created a pollable task that was picked up and executed by a worker.

mojito-api server handling a demo create request, creating the pollable task for asset extraction which is then handled by the mojito-worker container
Screenshot 2023-08-15 at 17 53 38

…ompose cluster to test API & worker nodes config
@aurambaj
Copy link
Collaborator

Nice! It will be very handy to have this docker-compose setup for testing.

/**
* Starts the scheduler after having removed outdated trigger/jobs
*
* @throws SchedulerException
*/
@PostConstruct
void startScheduler() throws SchedulerException {
Properties quartzProps = quartzPropertiesConfig.getQuartzProperties();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, this will do but I find it weird to have to inject/read the properties here again vs. being able to read information on the scheduler instance itself. With the multi scheduler implementation we may have a new Scheduler class that could include a field like "shouldStart". And this QuartzConfig may be totally different anyway as the job detail and outdated jobs will probably be per scheduler instances.

@maallen maallen merged commit 799d629 into master Aug 17, 2023
2 checks passed
aurambaj pushed a commit that referenced this pull request Sep 2, 2023
* Added config value to enable/disable Quartz scheduler. added docker compose cluster to test API & worker nodes config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants