From b910cf66f559dc9071b0d411fec5995e32c71104 Mon Sep 17 00:00:00 2001 From: Saeed Rezaee Date: Tue, 14 Jan 2025 14:05:56 +0100 Subject: [PATCH] Remove additional polling while installing updates Upon receiving a new deployment, the client starts to poll the server every 30 seconds (Hardcoded value) This commit removes this additional polling. Signed-off-by: Saeed Rezaee --- .../eclipse/hara/ddiclient/api/actors/ActionManager.kt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/kotlin/org/eclipse/hara/ddiclient/api/actors/ActionManager.kt b/src/main/kotlin/org/eclipse/hara/ddiclient/api/actors/ActionManager.kt index e9ec806..fb68332 100644 --- a/src/main/kotlin/org/eclipse/hara/ddiclient/api/actors/ActionManager.kt +++ b/src/main/kotlin/org/eclipse/hara/ddiclient/api/actors/ActionManager.kt @@ -18,7 +18,6 @@ import org.eclipse.hara.ddiclient.api.actors.ConnectionManager.Companion.Message import org.eclipse.hara.ddiclient.api.MessageListener import kotlinx.coroutines.ObsoleteCoroutinesApi import kotlinx.coroutines.runBlocking -import org.joda.time.Duration @OptIn(ObsoleteCoroutinesApi::class) class ActionManager @@ -55,8 +54,6 @@ private constructor(scope: ActorScope) : AbstractActor(scope) { LOG.info(msg.javaClass.simpleName) become(defaultReceive(state.copy(deployment = null))) child("deploymentManager")!!.close() - LOG.info("Restore server ping interval") - connectionManager.send(In.SetPing(null)) } msg is Out.DeploymentCancelInfo -> onCancelInfo(msg, state) @@ -64,8 +61,6 @@ private constructor(scope: ActorScope) : AbstractActor(scope) { msg is Message.UpdateStopped -> { LOG.info("update stopped") become(defaultReceive(state.copy(deployment = null))) - LOG.info("Restore server ping interval") - connectionManager.send(In.SetPing(null)) } state.inDeployment && msg is Out.NoAction -> { @@ -93,8 +88,6 @@ private constructor(scope: ActorScope) : AbstractActor(scope) { val deploymentManager = actorOf("deploymentManager") { DeploymentManager.of(it) } become(defaultReceive(state.copy(deployment = msg))) deploymentManager.send(msg) - LOG.info("DeploymentInfo msg, decreased ping interval to be reactive on server requests (ping: 30s)") - connectionManager.send(In.SetPing(Duration.standardSeconds(30))) } } } @@ -107,7 +100,6 @@ private constructor(scope: ActorScope) : AbstractActor(scope) { CancelFeedbackRequest.Status.Execution.closed, CancelFeedbackRequest.Status.Result.Finished.success))) notificationManager.send(MessageListener.Message.State.CancellingUpdate) - connectionManager.send(In.SetPing(null)) } !registry.currentUpdateIsCancellable() -> { @@ -121,8 +113,6 @@ private constructor(scope: ActorScope) : AbstractActor(scope) { else -> { LOG.warn("DeploymentCancelInfo") child("deploymentManager")!!.send(msg) - LOG.info("Restore server ping interval") - connectionManager.send(In.SetPing(null)) } } }