diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 6f2ed8c7c3..6817d8f015 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -114,3 +114,10 @@ services: arguments: - @cron.task_provider - @cache.driver + + cron.lock_db: + class: phpbb_lock_db + arguments: + - cron_lock + - @config + - @dbal.conn diff --git a/phpBB/cron.php b/phpBB/cron.php index 36b771f1b7..df48c2dc4d 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -71,7 +71,7 @@ else output_image(); } -$cron_lock = new phpbb_lock_db('cron_lock', $config, $db); +$cron_lock = $container->get('cron.lock_db'); if ($cron_lock->acquire()) { if ($config['use_system_cron'])