mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/dic] Move cron.lock_db into DIC
PHPBB3-10739
This commit is contained in:
parent
35c78c127b
commit
e78fbfef9c
2 changed files with 8 additions and 1 deletions
|
@ -114,3 +114,10 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @cron.task_provider
|
- @cron.task_provider
|
||||||
- @cache.driver
|
- @cache.driver
|
||||||
|
|
||||||
|
cron.lock_db:
|
||||||
|
class: phpbb_lock_db
|
||||||
|
arguments:
|
||||||
|
- cron_lock
|
||||||
|
- @config
|
||||||
|
- @dbal.conn
|
||||||
|
|
|
@ -71,7 +71,7 @@ else
|
||||||
output_image();
|
output_image();
|
||||||
}
|
}
|
||||||
|
|
||||||
$cron_lock = new phpbb_lock_db('cron_lock', $config, $db);
|
$cron_lock = $container->get('cron.lock_db');
|
||||||
if ($cron_lock->acquire())
|
if ($cron_lock->acquire())
|
||||||
{
|
{
|
||||||
if ($config['use_system_cron'])
|
if ($config['use_system_cron'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue