]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
proc_run was replaced
[friendica.git] / mod / item.php
index 103352194848a4ebe38f2005c872ff2348fdefad..0d09b1903aae8d4b1bd3a3a996e8e833d3d52329 100644 (file)
@@ -17,6 +17,7 @@
 
 use Friendica\App;
 use Friendica\Core\System;
+use Friendica\Core\Worker;
 
 require_once 'include/crypto.php';
 require_once 'include/enotify.php';
@@ -830,7 +831,7 @@ function item_post(App $a) {
                // update filetags in pconfig
                file_tag_update_pconfig($uid,$categories_old,$categories_new,'category');
 
-               proc_run(PRIORITY_HIGH, "include/notifier.php", 'edit_post', $post_id);
+               Worker::add(PRIORITY_HIGH, "notifier", 'edit_post', $post_id);
                if ((x($_REQUEST, 'return')) && strlen($return_path)) {
                        logger('return: ' . $return_path);
                        goaway($return_path);
@@ -1060,10 +1061,10 @@ function item_post(App $a) {
        // We now do it in the background to save some time.
        // This is important in interactive environments like the frontend or the API.
        // We don't fork a new process since this is done anyway with the following command
-       proc_run(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "include/create_shadowentry.php", $post_id);
+       Worker::add(array('priority' => PRIORITY_HIGH, 'dont_fork' => true), "create_shadowentry", $post_id);
 
        // Call the background process that is delivering the item to the receivers
-       proc_run(PRIORITY_HIGH, "include/notifier.php", $notify_type, $post_id);
+       Worker::add(PRIORITY_HIGH, "notifier", $notify_type, $post_id);
 
        logger('post_complete');