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:
@@ -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
|
||||
|
3
phpBB/config/default/routing/cron.yml
Normal file
3
phpBB/config/default/routing/cron.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
phpbb_cron_run:
|
||||
path: /{cron_type}
|
||||
defaults: { _controller: cron.controller:handle }
|
@@ -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
|
||||
|
Reference in New Issue
Block a user