Add m_ismasClient.updateOfPSASucceeded() for a successful run.

This commit is contained in:
Gerhard Hoffmann 2023-08-04 13:53:55 +02:00
parent 9c44656104
commit 6b4c486549

View File

@ -167,44 +167,56 @@ void Worker::privateUpdate() {
QString("#M=APISM#C=CMD_EVENT#J=") + QString("#M=APISM#C=CMD_EVENT#J=") +
m_ismasClient.checkoutBranch( m_ismasClient.checkoutBranch(
m_updateStatus.m_statusDescription, "")); m_updateStatus.m_statusDescription, ""));
emit setProgress(progress); emit setProgress(progress);
if (backendConnected()) {
qCritical() << "CHECKED OUT BRANCH";
if (backendConnected()) { qCritical() << "BACKEND CONNECTED";
progress = 20; progress = 20;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
if (updateTriggerSet()) { if (updateTriggerSet()) { qCritical() << "UPDATE TRIGGER SET";
progress = 30;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
if (customerEnvironment()) { if (customerEnvironment()) { qCritical() << "CUSTOMER ENVIRONMENT";
progress = 40;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
if (filesToUpdate()) { if (filesToUpdate()) { qCritical() << "FILES TO UPDATE";
progress = 50;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
if (updateFiles(progress)) { if (updateFiles(progress)) { qCritical() << "UPDATE FILES";
progress = 60;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
if (syncCustomerRepositoryAndFS()) { if (syncCustomerRepositoryAndFS()) { qCritical() << "SYNC REPOSITORY";
progress = 70;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
if (sendIsmasLastVersionNotification()) { if (sendIsmasLastVersionNotification()) { qCritical() << "SEND LAST NOTIFICATION";
progress = 80;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
sentIsmasLastVersionNotification = true; sentIsmasLastVersionNotification = true;
if (saveLogFile()) { if (saveLogFile()) { qCritical() << "SAVE LOG FILE";
progress = 90;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
emit appendText(QString(""), UPDATE_STEP_SUCCESS); 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 // mark update as activated -> this resets the WAIT button
progress = 100; progress = 100;
emit setProgress(progress); emit setProgress(progress);
m_ismasClient.setProgressInPercent(progress); m_ismasClient.setProgressInPercent(progress);
IsmasClient::sendRequestReceiveResponse(IsmasClient::APISM::DB_PORT, IsmasClient::sendRequestReceiveResponse(IsmasClient::APISM::DB_PORT,
QString("#M=APISM#C=CMD_EVENT#J=") + QString("#M=APISM#C=CMD_EVENT#J=") +
m_ismasClient.updateOfPSAActivated()); m_ismasClient.updateOfPSAActivated());
m_returnCode = 0; m_returnCode = 0;
} else { } else {
m_returnCode = -9; m_returnCode = -9;