multiple services with one jobrunr storage

1.1k Views Asked by At

I'd like to use jobrunr in multiple services (spring-boot apps) running with one DB, where jobrunr storage is. Is it possible to provide a custom storage provider, so each apps loads only jobs i.e. prefixed with the app name?

Or maybe there is other way around to solve my problem which is: When another app starts and connects to the same storage (where there are already defined recurring jobs) it tries to run these recurring job and fails: Job(id=f6f51cb7-a4b3-4206-98a7-7b8a6b7d4132, jobName='JOB-NAME') processing failed: Job method not found.

thanks, Chris

1

There are 1 best solutions below

0
A. Dejan On

Take a look at https://www.jobrunr.io/en/documentation/configuration/spring/

You can set org.jobrunr.database.table-prefix per service in your application.properties, so that your services will use shared storage but they will operate on separate database tables.