allow snapshots to be disabled easily

This commit is contained in:
Evan Prodromou 2009-04-16 12:53:17 -04:00
parent 6a247acb45
commit 0838143d58
2 changed files with 6 additions and 1 deletions

View File

@ -158,7 +158,8 @@ $config =
array('subscribe' => null,
'welcome' => null),
'snapshot' =>
array('run' => 'web',
array('enabled' => true,
'run' => 'web',
'frequency' => 10000,
'reporturl' => 'http://laconi.ca/stats/report'),
);

View File

@ -73,6 +73,10 @@ class Snapshot
static function check()
{
if (!common_config('snapshot', 'enabled')) {
return;
}
switch (common_config('snapshot', 'run')) {
case 'web':
// skip if we're not running on the Web.