Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Subatomic App Production Scheduler Batch Job runs twice

I have a quarkus scheduler which runs a batch job every thirty minutes. When we deployed the subatomic app of production, since there is the high availability, naturally two docker containers were running. This also meant the batch job runs parallely twice, every thirty minutes. Is there any way to make sure only one container runs the batch job?

Posted one year ago
Votes Newest

Answers 2

I have used a third party package called Shedlock. Here the Containers fight over locking a table and then one of them gets the lock. The one that gets the lock will get to run the cronjob. It seems to work well so far :-).

Posted one year ago

This is a common and widespread "problem" in scaled applications. There are thousand of solution, so there is no "right" answer for this. As a hint there is a feature when using quartz which is common and documented with quarkus: https://quarkus.io/guides/quartz

So it is up to you to read up on other solutions and find a fit for your case :)

Posted one year ago
Edited one year ago
Lucas Reeh
108 × 4 Administrator

Surprisingly, when there is a database table queue to be processed, only one docker container gets access to the table. I guess since there is a database level lock. The other docker container doesn't or can't do anything. That way the problem seems to have solved itself in a very unelegant way. There must be some repurcussions to this.

Anand Natampalli   one year ago Report
2 Answers
one year ago
one year ago