load_hooks();
logger('onepoll: start');
-
+
$manual_id = 0;
$generation = 0;
$hub_update = false;
logger('onepoll: no contact');
return;
}
-
+
+ // Test
+ $lockpath = get_config('system','lockpath');
+ if ($lockpath != '') {
+ $pidfile = new pidfile($lockpath, 'onepoll'.$contact_id.'.lck');
+ if($pidfile->is_already_running()) {
+ logger("onepoll: Already running for contact ".$contact_id);
+ exit;
+ }
+ }
+
$d = datetime_convert();
// clear cache for photos
clear_cache($a->get_basepath(), $a->get_basepath()."/photo");
+ // clear smarty cache
+ clear_cache($a->get_basepath()."/view/smarty3/compiled", $a->get_basepath()."/view/smarty3/compiled");
+
set_config('system','cache_last_cleared', time());
}