Skip to content

Commit

Permalink
Handle download only feature of Hawkbit
Browse files Browse the repository at this point in the history
Regarding the download-only deployment feature, the feature intends to
allows users to download updates without immediately installing them.
Since skipping the installation doesn't make much sense, as the
installation is managed by the ddi-client, the update skip is treated
 as a soft update.
The ddi-client already exhibits this behavior; this commit simply
 refactors the code related to the mentioned feature.

Signed-off-by: Saeed Rezaee <[email protected]>
  • Loading branch information
SaeedRe committed Feb 23, 2024
1 parent 01e5da6 commit cae8752
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ private constructor(scope: ActorScope) : AbstractActor(scope) {
forceDownloadTheArtifact(msg)
}

msg.isDownloadSoft -> {
attemptDownloadingTheArtifact(State(msg.info), msg)
}

msg.isDownloadSkip -> {
// todo implement download skip option
LOG.warn("skip download not yet implemented (used attempt)")
else -> {
attemptDownloadingTheArtifact(State(msg.info), msg)
}
}
Expand Down Expand Up @@ -309,9 +303,6 @@ private constructor(scope: ActorScope) : AbstractActor(scope) {
private val DeploymentInfo.isDownloadSoft: Boolean
get() = info.deployment.download == attempt

private val DeploymentInfo.isDownloadSkip: Boolean
get() = info.deployment.download == attempt

private fun childName(md5: String) = "fileDownloader_for_$md5"

private fun clean(currentActionId: String) = runBlocking {
Expand Down

0 comments on commit cae8752

Please sign in to comment.