kagkarlsson / db-scheduler

Persistent cluster-friendly scheduler for Java
Apache License 2.0
1.22k stars 186 forks source link

Support custom task repositories #173

Open kagkarlsson opened 3 years ago

kagkarlsson commented 3 years ago
LeslieMurphy commented 3 years ago

A generalized TaskRepository is a good idea.

It would also be helpful to be able to use the JdbcTaskRepository without starting up the scheduler. Not sure if that is already possible.

e,g. could we use JdbcTaskRepository .removeExecutions be used to remove an old/defunct task BEFORE starting up the scheduler - to avoid the log warning about an obsolete task not being defined in the code?

2021-04-07 07:22:02.655 WARN 23524 --- [pool-2-thread-1] c.g.k.scheduler.jdbc.JdbcTaskRepository : Failed to find implementation for task with name 'obsolete-task'. Execution will be excluded from due. Either delete the execution from the database, or add an implementation for it. The scheduler may be configured to automatically delete unresolved tasks after a certain period of time.

meggarr commented 1 year ago

A generalized TaskRepository could make it possible to impl. one based something that is not a traditional DB, e.g. Apache Zookeeper.

kagkarlsson commented 1 year ago

I am warming to the idea, but limited time. Would be cool to also try and support something dead-simple like gcs and s3..