Skip to content
Permalink
Browse files

improved cache report queuing time estimation

  • Loading branch information...
following5 committed Feb 17, 2016
1 parent bff83c1 commit a918ad42fdcd743741eb33450029c67522a479c3
Showing with 5 additions and 6 deletions.
  1. +2 −2 htdocs/doc/sql/static-data/data.sql
  2. +2 −2 htdocs/reportcache.php
  3. +1 −2 htdocs/templates2/ocstyle/reportcache.tpl
@@ -2818,7 +2818,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2531', 'All new
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2532', '... by log date', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2533', 'Good and inappropriate reasons to report a cache', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2534', '%1 reports are being processed, %2 reports are pending', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2535', 'estimated queuing time for new reports: about %1 to %2 days', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2535', 'queuing time for new reports: about %1 to %2 days', '2015-01-20 20:37:00');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2536', 'Cache list:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2537', 'Cache lists:', '2015-06-17 10:09:14');

INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2532', 'DE', '... nach Logdatum', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2533', 'DE', 'Gute und unpassende Gründe für eine Cachemeldung', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2534', 'DE', '%1 Meldungen sind in Bearbeitung, %2 Meldungen sind offen', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2535', 'DE', 'geschätzte Wartezeit für neue Meldungen: ca. %1–%2 Tage', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2535', 'DE', 'Wartezeit für neue Meldungen: ca. %1–%2 Tage', '2015-01-20 20:37:00');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2536', 'DE', 'Cacheliste:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2537', 'DE', 'Cachelisten:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs', '2010-09-02 00:15:30');
@@ -85,8 +85,8 @@
if ($opt['logic']['cache_reports']['min_processperday'] > 0)
{
$waitdays_min = 1 + floor(($open_reports + $opt['logic']['cache_reports']['max_processperday'] - 1) / $opt['logic']['cache_reports']['max_processperday']);
$waitdays_max = 1 + $opt['logic']['cache_reports']['delaydays'] + floor(($open_reports + $opt['logic']['cache_reports']['min_processperday'] - 1) / $opt['logic']['cache_reports']['min_processperday']);
$waitdays_min = 1 + floor(($open_reports + $opt['logic']['cache_reports']['max_processperday']/2) / $opt['logic']['cache_reports']['max_processperday']);
$waitdays_max = 1 + $opt['logic']['cache_reports']['delaydays'] + floor(($open_reports + $opt['logic']['cache_reports']['min_processperday']/2) / $opt['logic']['cache_reports']['min_processperday']);
$tpl->assign('waitdays_min', $waitdays_min);
$tpl->assign('waitdays_max', $waitdays_max);
}
@@ -60,8 +60,7 @@
<tr>
<td colspan="2" class="info">
{t 1=$processing_reports 2=$open_reports}%1 reports are being processed, %2 reports are pending{/t}{if $waitdays_min};
<br />
{t 1=$waitdays_min 2=$waitdays_max}estimated queuing time for new reports: about %1 to %2 days{/t}
{t 1=$waitdays_min 2=$waitdays_max}queuing time for new reports: about %1 to %2 days{/t}
{/if}
</td>
</tr>

0 comments on commit a918ad4

Please sign in to comment.
You can’t perform that action at this time.