From 6b4c4865494128e47ec90319b339df4474ff4d86 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 4 Aug 2023 13:53:55 +0200 Subject: [PATCH] Add m_ismasClient.updateOfPSASucceeded() for a successful run. --- worker.cpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/worker.cpp b/worker.cpp index 70775d9..d96a372 100644 --- a/worker.cpp +++ b/worker.cpp @@ -167,44 +167,56 @@ void Worker::privateUpdate() { QString("#M=APISM#C=CMD_EVENT#J=") + m_ismasClient.checkoutBranch( m_updateStatus.m_statusDescription, "")); - emit setProgress(progress); - if (backendConnected()) { + + qCritical() << "CHECKED OUT BRANCH"; + if (backendConnected()) { qCritical() << "BACKEND CONNECTED"; progress = 20; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); - if (updateTriggerSet()) { + if (updateTriggerSet()) { qCritical() << "UPDATE TRIGGER SET"; + progress = 30; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); - if (customerEnvironment()) { + if (customerEnvironment()) { qCritical() << "CUSTOMER ENVIRONMENT"; + progress = 40; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); - if (filesToUpdate()) { + if (filesToUpdate()) { qCritical() << "FILES TO UPDATE"; + progress = 50; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); - if (updateFiles(progress)) { + if (updateFiles(progress)) { qCritical() << "UPDATE FILES"; + progress = 60; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); - if (syncCustomerRepositoryAndFS()) { + if (syncCustomerRepositoryAndFS()) { qCritical() << "SYNC REPOSITORY"; + progress = 70; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); - if (sendIsmasLastVersionNotification()) { + if (sendIsmasLastVersionNotification()) { qCritical() << "SEND LAST NOTIFICATION"; + progress = 80; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); sentIsmasLastVersionNotification = true; - if (saveLogFile()) { + if (saveLogFile()) { qCritical() << "SAVE LOG FILE"; + progress = 90; emit setProgress(progress); m_ismasClient.setProgressInPercent(progress); emit appendText(QString(""), UPDATE_STEP_SUCCESS); + IsmasClient::sendRequestReceiveResponse(IsmasClient::APISM::DB_PORT, + QString("#M=APISM#C=CMD_EVENT#J=") + + m_ismasClient.updateOfPSASucceeded("")); + // mark update as activated -> this resets the WAIT button progress = 100; emit setProgress(progress); + m_ismasClient.setProgressInPercent(progress); IsmasClient::sendRequestReceiveResponse(IsmasClient::APISM::DB_PORT, QString("#M=APISM#C=CMD_EVENT#J=") + m_ismasClient.updateOfPSAActivated()); - m_returnCode = 0; } else { m_returnCode = -9;