-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
…ompose cluster to test API & worker nodes config
webapp/src/main/java/com/box/l10n/mojito/quartz/QuartzConfig.java
Outdated
Show resolved
Hide resolved
Nice! It will be very handy to have this docker-compose setup for testing. |
…replicas for api & worker nodes
/** | ||
* Starts the scheduler after having removed outdated trigger/jobs | ||
* | ||
* @throws SchedulerException | ||
*/ | ||
@PostConstruct | ||
void startScheduler() throws SchedulerException { | ||
Properties quartzProps = quartzPropertiesConfig.getQuartzProperties(); |
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.
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.
* Added config value to enable/disable Quartz scheduler. added docker compose cluster to test API & worker nodes config
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 themojito-worker
container