Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-05 08:44:37 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-05 08:44:37 +0400
commit3e03b0a7ca4055b4f05be7d4ec7bcfaacf364eff (patch)
tree47afa18c0b671f38e17405078bdee156ad020058 /plugins/DBStats/DBStats.php
parent0ed11b178860844b97b967f6cfa1ffd12ab2eaab (diff)
refs #5301 started to simplify scheduled tasks API while staying backwards compatible
Diffstat (limited to 'plugins/DBStats/DBStats.php')
-rw-r--r--plugins/DBStats/DBStats.php36
1 files changed, 0 insertions, 36 deletions
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php
index ac6ee1e355..03c04700a1 100644
--- a/plugins/DBStats/DBStats.php
+++ b/plugins/DBStats/DBStats.php
@@ -8,19 +8,13 @@
*/
namespace Piwik\Plugins\DBStats;
-use Piwik\Date;
use Piwik\Option;
use Piwik\Piwik;
use Piwik\Plugin\ViewDataTable;
use Piwik\Plugins\CoreVisualizations\Visualizations\Graph;
use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Pie;
-use Piwik\ScheduledTask;
-use Piwik\ScheduledTime;
-/**
- *
- */
class DBStats extends \Piwik\Plugin
{
const TIME_OF_LAST_TASK_RUN_OPTION = 'dbstats_time_of_last_cache_task_run';
@@ -32,42 +26,12 @@ class DBStats extends \Piwik\Plugin
{
return array(
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks',
'ViewDataTable.configure' => 'configureViewDataTable',
'ViewDataTable.getDefaultType' => 'getDefaultTypeViewDataTable',
"TestingEnvironment.addHooks" => 'setupTestEnvironment'
);
}
- /**
- * Gets all scheduled tasks executed by this plugin.
- */
- public function getScheduledTasks(&$tasks)
- {
- $cacheDataByArchiveNameReportsTask = new ScheduledTask(
- $this,
- 'cacheDataByArchiveNameReports',
- null,
- ScheduledTime::factory('weekly'),
- ScheduledTask::LOWEST_PRIORITY
- );
- $tasks[] = $cacheDataByArchiveNameReportsTask;
- }
-
- /**
- * Caches the intermediate DataTables used in the getIndividualReportsSummary and
- * getIndividualMetricsSummary reports in the option table.
- */
- public function cacheDataByArchiveNameReports()
- {
- $api = API::getInstance();
- $api->getIndividualReportsSummary(true);
- $api->getIndividualMetricsSummary(true);
-
- $now = Date::now()->getLocalized("%longYear%, %shortMonth% %day%");
- Option::set(self::TIME_OF_LAST_TASK_RUN_OPTION, $now);
- }
-
public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = "plugins/DBStats/stylesheets/dbStatsTable.less";