mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-10 18:54:08 +02:00
[feature/system-cron] Cache cron's task names.
Instead of using a path relative to phpbb_root_path the path to the task directory is directly passed to the cron manager. Dummy tasks are now in the tests directory directly. PHPBB3-9596
This commit is contained in:
committed by
Oleg Pudeyev
parent
7a8233020b
commit
09b136272b
23
tests/cron/task/testmod/dummy_task.php
Normal file
23
tests/cron/task/testmod/dummy_task.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_cron_task_testmod_dummy_task extends phpbb_cron_task_base
|
||||
{
|
||||
public static $was_run = 0;
|
||||
|
||||
public function run()
|
||||
{
|
||||
self::$was_run++;
|
||||
}
|
||||
|
||||
public function should_run()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
23
tests/cron/task/testmod/second_dummy_task.php
Normal file
23
tests/cron/task/testmod/second_dummy_task.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_cron_task_testmod_second_dummy_task extends phpbb_cron_task_base
|
||||
{
|
||||
public static $was_run = 0;
|
||||
|
||||
public function run()
|
||||
{
|
||||
self::$was_run++;
|
||||
}
|
||||
|
||||
public function should_run()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user