1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

[ticket/14542] Move cron to controller

PHPBB3-14542
This commit is contained in:
Máté Bartus
2016-03-18 22:57:02 +01:00
parent d74e85ffd9
commit 6eecc26e31
13 changed files with 374 additions and 83 deletions

View File

@@ -3,6 +3,7 @@ services:
class: phpbb\cron\manager
arguments:
- '@cron.task_collection'
- '@routing.helper'
- '%core.root_path%'
- '%core.php_ext%'
@@ -13,6 +14,18 @@ services:
- '@config'
- '@dbal.conn'
cron.controller:
class: phpbb\cron\controller\cron
cron.event_listener:
class: phpbb\cron\event\cron_runner_listener
arguments:
- '@cron.lock_db'
- '@cron.manager'
- '@request'
tags:
- { name: kernel.event_subscriber }
# ----- Cron tasks -----
cron.task_collection:
class: phpbb\di\service_collection

View File

@@ -0,0 +1,3 @@
phpbb_cron_run:
path: /{cron_type}
defaults: { _controller: cron.controller:handle }

View File

@@ -8,6 +8,10 @@
# instantiate the 'foo_service' service and call the 'method' method.
#
phpbb_cron_routing:
resource: cron.yml
prefix: /cron
phpbb_feed_routing:
resource: feed.yml
prefix: /feed