summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-04-26 15:21:39 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-04-26 16:05:28 +0200
commited89e603e0b4c9d1bff617df9c127031001ed008 (patch)
tree09bf03d639e83da600cec706b485e712c14525b1 /admin
parent40525b10af2caa2408ed1e267588b026cefa0a1d (diff)
#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.
Diffstat (limited to 'admin')
-rw-r--r--admin/WebConsole/rest/remotepc.php6
1 files changed, 6 insertions, 0 deletions
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 = <<<EOD
@@ -679,6 +682,9 @@ INSERT INTO acciones
idcentro=$ouid;
EOD;
$cmd->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 = <<<EOD