From ed89e603e0b4c9d1bff617df9c127031001ed008 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Mon, 26 Apr 2021 15:21:39 +0200 Subject: #942 Adapt RemotePC API to use new queue implementation RemotePC API queues commands only inserting them in the database and expects ogServer to find them and send them to its respective clients. Since v1.2.0, ogServer do not seek the database periodically searching for pending commands. Now ogServer expose an HTTP API to queue commands. This commit adapts RemotePC API to use new ogServer queue API. --- admin/WebConsole/rest/remotepc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/admin/WebConsole/rest/remotepc.php b/admin/WebConsole/rest/remotepc.php index 6a897e0a..6dc5a62d 100644 --- a/admin/WebConsole/rest/remotepc.php +++ b/admin/WebConsole/rest/remotepc.php @@ -185,6 +185,9 @@ INSERT INTO acciones idcentro=$ouid; EOD; $t2 = $cmd->Ejecutar(); + create_schedule_now(strval($timestamp), + $EJECUCION_COMANDO, + "auto-queue-remotepc-reserve-".$timestamp); // Create event to remove reservation on timeout (15 min.). $timeout = "15 MINUTE"; $cmd->texto = <<Ejecutar(); + create_schedule_now(strval($timestamp), + $EJECUCION_COMANDO, + "auto-queue-remotepc-init-".$timestamp); // Create event to remove the operation on timeout (15 min.). $timeout = "15 MINUTE"; $cmd->texto = <<