mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-27 08:50:51 +01:00
replace QuartzScheduler with a more lightweight scheduler
The new scheduler is based on the cron-utils package and uses the same cron syntax as quartz. CronScheduler was mainly introduced, because of a ClassLoader leak with the old Quartz implementation. The leak comes from shiros use of InheriatableThreadLocal in combination with the WorkerThreads of Quartz. CronScheduler uses a ThreadFactory which clears the Shiro context before a new Thread is created (see CronThreadFactory).
This commit is contained in:
@@ -80,7 +80,7 @@ import sonia.scm.repository.api.RepositoryServiceFactory;
|
||||
import sonia.scm.repository.spi.HookEventFacade;
|
||||
import sonia.scm.repository.xml.XmlRepositoryDAO;
|
||||
import sonia.scm.repository.xml.XmlRepositoryRoleDAO;
|
||||
import sonia.scm.schedule.QuartzScheduler;
|
||||
import sonia.scm.schedule.CronScheduler;
|
||||
import sonia.scm.schedule.Scheduler;
|
||||
import sonia.scm.security.AccessTokenCookieIssuer;
|
||||
import sonia.scm.security.AuthorizationChangedEventProducer;
|
||||
@@ -218,7 +218,7 @@ public class ScmServletModule extends ServletModule
|
||||
bind(PluginManager.class, DefaultPluginManager.class);
|
||||
|
||||
// bind scheduler
|
||||
bind(Scheduler.class).to(QuartzScheduler.class);
|
||||
bind(Scheduler.class).to(CronScheduler.class);
|
||||
|
||||
// bind health check stuff
|
||||
bind(HealthCheckContextListener.class);
|
||||
|
||||
Reference in New Issue
Block a user