aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-07-15 09:51:42 +0200
committerMario <mario@mariovavti.com>2019-07-15 09:51:42 +0200
commit250387c7e547504c1bb06b6904f79f32461d855d (patch)
tree68a30f058e7b1d4e48b93cf15b3c1ee5efa4245d
parentb2d3a11de8ed9a7eb86159520705dd04bb821dcc (diff)
parentdde7144f5acdebf2dfee18ba2848594d33e9d12b (diff)
downloadvolse-hubzilla-250387c7e547504c1bb06b6904f79f32461d855d.tar.gz
volse-hubzilla-250387c7e547504c1bb06b6904f79f32461d855d.tar.bz2
volse-hubzilla-250387c7e547504c1bb06b6904f79f32461d855d.zip
Merge branch 'queueworker-updates' into 'dev'
Hookify Zotlabs\Daemon\Master::Summon See merge request hubzilla/core!1692
-rw-r--r--Zotlabs/Daemon/Master.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/Zotlabs/Daemon/Master.php b/Zotlabs/Daemon/Master.php
index 857d47243..67a3acc0a 100644
--- a/Zotlabs/Daemon/Master.php
+++ b/Zotlabs/Daemon/Master.php
@@ -17,7 +17,22 @@ if(array_search( __file__ , get_included_files()) === 0) {
class Master {
static public function Summon($arr) {
- proc_run('php','Zotlabs/Daemon/Master.php',$arr);
+ $hookinfo = [
+ 'argv'=>$arr
+ ];
+
+ call_hooks ('daemon_master_summon',$hookinfo);
+
+ $arr = $hookinfo['argv'];
+ $argc = count($arr);
+
+ if ((!is_array($arr) || (count($arr) < 1))) {
+ logger("Summon handled by hook.",LOGGER_DEBUG);
+ return;
+ }
+
+ $phpbin = get_config('system','phpbin','php');
+ proc_run($phpbin,'Zotlabs/Daemon/Master.php',$arr);
}
static public function Release($argc,$argv) {
@@ -33,6 +48,7 @@ class Master {
$argc = count($argv);
if ((!is_array($argv) || (count($argv) < 1))) {
+ logger("Release handled by hook.",LOGGER_DEBUG);
return;
}