]> git.mxchange.org Git - friendica.git/blobdiff - include/delivery.php
Scrape: Always take the first alias
[friendica.git] / include / delivery.php
index 5ef942dd06627209817a43d4ff4ffb379584a294..e5ca0946b34db2de8533024a398daf2d60e5117e 100644 (file)
@@ -57,17 +57,8 @@ function delivery_run(&$argv, &$argc){
                        continue;
                }
 
-               $maxsysload = intval(get_config('system','maxloadavg'));
-               if($maxsysload < 1)
-                       $maxsysload = 50;
-
-               $load = current_load();
-               if($load) {
-                       if(intval($load) > $maxsysload) {
-                               logger('system: load ' . $load . ' too high. Delivery deferred to next queue run.');
-                               return;
-                       }
-               }
+               if (App::maxload_reached())
+                       return;
 
                // It's ours to deliver. Remove it from the queue.
 
@@ -374,7 +365,7 @@ function delivery_run(&$argv, &$argc){
                                                        break;
 
                                                logger('mod-delivery: local delivery');
-                                               local_delivery($x[0],$atom);
+                                               dfrn::import($atom, $x[0]);
                                                break;
                                        }
                                }