]> git.mxchange.org Git - friendica.git/blobdiff - include/onepoll.php
Merge remote-tracking branch 'upstream/master'
[friendica.git] / include / onepoll.php
index 6ff58af6b4e31899cdc3e8749d504345428e357d..f38f6b4c61d88fbf54528267d3940e52f64530d5 100644 (file)
@@ -42,7 +42,7 @@ function onepoll_run(&$argv, &$argc){
        load_hooks();
 
        logger('onepoll: start');
-       
+
        $manual_id  = 0;
        $generation = 0;
        $hub_update = false;
@@ -56,7 +56,17 @@ function onepoll_run(&$argv, &$argc){
                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();