diff --git a/cacic-daemon/cacicD/cacictimer.cpp b/cacic-daemon/cacicD/cacictimer.cpp index 7e8fba7..693bce2 100644 --- a/cacic-daemon/cacicD/cacictimer.cpp +++ b/cacic-daemon/cacicD/cacictimer.cpp @@ -66,15 +66,6 @@ void CacicTimer::mslot(){ cacicthread->setCMutex(cMutex); cacicthread->setModuloDirPath(getDirProgram()); cacicthread->start(QThread::NormalPriority); - // if(nome == "gercols" ){ - // //Envio do json gerado na coleta - // bool ok = false; - // QJsonObject jsonColeta = ccacic->getJsonFromFile(this->applicationDirPath + "/coleta.json"); - // OCacicComm->comm("/ws/neo/coleta", &ok, jsonColeta , false); - // if(&ok){ - // QLogger::QLog_Info("Cacic Daemon (Timer)", QString("coleta enviada com sucesso.")); - // } - // } }else{ QLogger::QLog_Error("Cacic Daemon (Timer)", "Falha na obtenção do arquivo de configuração."); } @@ -89,6 +80,7 @@ bool CacicTimer::verificarEIniciarQMutex(){ if(!cacicthread->isRunning()){ cMutex->lock(); QLogger::QLog_Info("Cacic Daemon (Timer)", "Semáforo fechado com sucesso."); + return true; }else{ QLogger::QLog_Info("Cacic Daemon (Timer)", "Possivelmente o gercols travou e será finalizado."); try{ diff --git a/src/ccoleta.cpp b/src/ccoleta.cpp index e9bd6a8..920f9f9 100644 --- a/src/ccoleta.cpp +++ b/src/ccoleta.cpp @@ -7,11 +7,11 @@ CColeta::CColeta(QObject *parent) void CColeta::coletaHardware() { - qDebug() << "coletaHardware() começando sua execução"; oHardware.iniciaColeta(); qDebug() << "coletaHardware() executado"; emit hardwareFinish(); + emit beginSoftware(); } @@ -28,6 +28,7 @@ void CColeta::configuraColetas(){ QObject::connect(this, SIGNAL(beginSoftware()), this, SLOT(coletaSoftware())); QObject::connect(this, SIGNAL(softwareFinish()), this, SLOT(softwareReady())); QObject::connect(this, SIGNAL(hardwareFinish()), this, SLOT(hardwareReady())); + emit beginHardware(); } bool CColeta::waitToCollect() -- libgit2 0.21.2