ad timer to update tool 60min max / 30min per Step

This commit is contained in:
2026-10-08 12:53:32 +02:00
parent 6bc3345ee8
commit ccb0bc4217
4 changed files with 107 additions and 12 deletions
+24 -2
View File
@@ -151,12 +151,34 @@ bool Command::execute(QString workingDirectory, QStringList args) {
// qDebug() << "PROCESS" << m_command << "STARTED IN" << p->workingDirectory();
if (p->state() == QProcess::ProcessState::Running) {
// qDebug() << "PROCESS" << m_command << "RUNNING IN" << p->workingDirectory();
// wait forever for git/opkg-commands to finish
// wait forever for git/opkg-commands to finish ------------------- wait for 30 min max!
int wait = m_waitForFinishTimeout;
if (m_command.trimmed().startsWith("git", Qt::CaseInsensitive) ||
m_command.trimmed().startsWith("opkg", Qt::CaseInsensitive)) {
wait = -1;
wait = 30 * 60 * 1000;
}
if (!p->waitForFinished(wait)) {
qCritical() << "PROCESS TIMEOUT:" << m_command;
p->terminate();
if (!p->waitForFinished(5000)) {
qCritical() << "Process did not terminate, killing:"
<< m_command;
p->kill();
if (!p->waitForFinished(5000)) {
qCritical() << "ERROR: Process still did not finish after kill:"
<< m_command;
}
}
m_exitCode = -1;
return false;
}
bool const no_timeout = p->waitForFinished(wait);
if (no_timeout) {
// qDebug() << "PROCESS" << m_command << "FINISHED IN" << p->workingDirectory();