I ended up extending the StdJDBCDelegate
extension and overriding deleteTrigger()
as no-op:
package com.example; class DurableTriggersDriverDelegate extends StdJDBCDelegate { public DurableTriggersDriverDelegate(Logger logger, String tablePrefix, String schedName, String instanceId, ClassLoadHelper classLoadHelper) { super(logger, tablePrefix, schedName, instanceId, classLoadHelper); } public DurableTriggersDriverDelegate(Logger logger, String tablePrefix, String schedName, String instanceId, ClassLoadHelper classLoadHelper, Boolean useProperties) { super(logger, tablePrefix, schedName, instanceId, classLoadHelper, useProperties); } @Override public int deleteTrigger(Connection conn, TriggerKey triggerKey) throws SQLException { this.logger.debug("deleteTrigger(" + conn + ") skipped"); return 1; } }
The new implementation can be easily connected via quartz.properties
:
org.quartz.jobStore.driverDelegateClass=com.example.DurableTriggersDriverDelegate
This solution has several disadvantages:
the database continues to grow and grow without deleting triggers
deleting a task is impossible, since it first tries to delete all the triggers (but this does not happen), and a violation of the restriction occurs when you try to delete the data about the work
However, he solved my original problem.
source share