From a825ec10d12818801009d4f45fae8605e3bb8a1d Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 6 Apr 2015 16:01:56 +0200 Subject: [PATCH] ass sendBackgroundEvent to Backend class --- .../mvc/app/library/OPNsense/Core/Backend.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/opnsense/mvc/app/library/OPNsense/Core/Backend.php b/src/opnsense/mvc/app/library/OPNsense/Core/Backend.php index 41b3c325d..11f88a6b0 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Core/Backend.php +++ b/src/opnsense/mvc/app/library/OPNsense/Core/Backend.php @@ -88,4 +88,16 @@ class Backend return $resp; } + + /** + * send event to backend, but prefix & to force it to run in background + * @param string $event event string + * @param int $timeout timeout in seconds + * @return string (message uuid from configd) + * @throws \Exception + */ + public function sendBackgroundEvent($event, $timeout = 120) + { + return $this->sendEvent('&'.$event, $timeout); + } }