Check ISMAS update trigger as very first thing.
Save the result in m_ismasTriggerActive for later use.
This commit is contained in:
parent
db24853062
commit
0dff2ece75
36
worker.cpp
36
worker.cpp
@ -260,6 +260,34 @@ void Worker::privateUpdate() {
|
||||
|
||||
QScopedPointer<UpdateProcessRunning> upr(new UpdateProcessRunning(this));
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CHECK UPDATE TRIGGER
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// NOTE: make sure that nothing is sent to ISMAS during updateTriggerSet
|
||||
ISMAS() << UPDATE_STEP::CHECK_ISMAS_TRIGGER;
|
||||
m_ismasTriggerActive = false;
|
||||
m_updateNotNecessary = false;
|
||||
|
||||
m_ismasTriggerActive = updateTriggerSet();
|
||||
if (m_ismasTriggerActive == false) {
|
||||
if (QDir(m_customerRepository).exists()) { // ignore a possibly corrupted repository
|
||||
m_versionInfo = m_gc.gitShowReason(m_branchName);
|
||||
QDateTime const ¤t = QDateTime::currentDateTime();
|
||||
if (current.time().hour() < 4) { // update has been triggered within [00:00:00, 00:03:59]
|
||||
m_updateNotNecessary = true;
|
||||
m_ismasTriggerStatusMessage = QStringList(QString("NO UPDATE NECESSARY (%1)").arg(current.toString(Qt::ISODate)));
|
||||
m_lastFailedUpdateStep = UPDATE_STEP::NONE;
|
||||
}
|
||||
// the customer-repository does exist, but the ISMAS-trigger is
|
||||
// *NOT* "WAIT", so STOP the update procedure
|
||||
return;
|
||||
}
|
||||
// in case the customer-repository does not exist, so PROCEED with the
|
||||
// update procedure, even if ISMAS-trigger is not correctly set ("WAIT")
|
||||
}
|
||||
|
||||
QDir customerRepository(m_customerRepository);
|
||||
QDir customerRepositoryEtc(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/"));
|
||||
|
||||
@ -347,14 +375,8 @@ void Worker::privateUpdate() {
|
||||
setProgress(_CHECKOUT_REPOSITORY_SUCCESS);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CHECK UPDATE TRIGGER
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
m_ismasTriggerActive = false;
|
||||
if (m_clone == false) {
|
||||
if ((continueUpdate = updateTriggerSet()) == false) {
|
||||
if (m_ismasTriggerActive == false) {
|
||||
return;
|
||||
} else {
|
||||
GUI() << (ISMAS() << (CONSOLE() << UPDATE_STEP::CHECK_ISMAS_TRIGGER_SUCCESS));
|
||||
|
Loading…
Reference in New Issue
Block a user