diff options
author | Máté Bartus <mate.bartus@gmail.com> | 2016-03-18 22:57:02 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-05-06 21:45:15 +0200 |
commit | 7a173877b7244f4ab6a8ff7b6fa0d6450027751b (patch) | |
tree | 5f820d58f33a9e972815007dfc79494669d7e702 /phpBB/config/default | |
parent | 41956a8b9050fa6e1e301bfae51d947e6f13c068 (diff) | |
download | forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar.gz forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar.bz2 forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.tar.xz forums-7a173877b7244f4ab6a8ff7b6fa0d6450027751b.zip |
[ticket/14542] Move cron to controller
PHPBB3-14542
Diffstat (limited to 'phpBB/config/default')
-rw-r--r-- | phpBB/config/default/container/services_cron.yml | 13 | ||||
-rw-r--r-- | phpBB/config/default/routing/cron.yml | 3 | ||||
-rw-r--r-- | phpBB/config/default/routing/routing.yml | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/config/default/container/services_cron.yml b/phpBB/config/default/container/services_cron.yml index d7f6388536..70f70e355d 100644 --- a/phpBB/config/default/container/services_cron.yml +++ b/phpBB/config/default/container/services_cron.yml @@ -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 diff --git a/phpBB/config/default/routing/cron.yml b/phpBB/config/default/routing/cron.yml new file mode 100644 index 0000000000..5a634166fa --- /dev/null +++ b/phpBB/config/default/routing/cron.yml @@ -0,0 +1,3 @@ +phpbb_cron_run: + path: /{cron_type} + defaults: { _controller: cron.controller:handle } diff --git a/phpBB/config/default/routing/routing.yml b/phpBB/config/default/routing/routing.yml index f381f024ad..199c5229b0 100644 --- a/phpBB/config/default/routing/routing.yml +++ b/phpBB/config/default/routing/routing.yml @@ -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 |