Commit 731e5585adb3be911e2cf348dc98ae1108234e5d
Exists in
master
Merge branch 'master' of https://github.com/lightbase/cacic-agente
Showing
2 changed files
with
3 additions
and
10 deletions
Show diff stats
cacic-daemon/cacicD/cacictimer.cpp
| @@ -66,15 +66,6 @@ void CacicTimer::mslot(){ | @@ -66,15 +66,6 @@ void CacicTimer::mslot(){ | ||
| 66 | cacicthread->setCMutex(cMutex); | 66 | cacicthread->setCMutex(cMutex); |
| 67 | cacicthread->setModuloDirPath(getDirProgram()); | 67 | cacicthread->setModuloDirPath(getDirProgram()); |
| 68 | cacicthread->start(QThread::NormalPriority); | 68 | cacicthread->start(QThread::NormalPriority); |
| 69 | - // if(nome == "gercols" ){ | ||
| 70 | - // //Envio do json gerado na coleta | ||
| 71 | - // bool ok = false; | ||
| 72 | - // QJsonObject jsonColeta = ccacic->getJsonFromFile(this->applicationDirPath + "/coleta.json"); | ||
| 73 | - // OCacicComm->comm("/ws/neo/coleta", &ok, jsonColeta , false); | ||
| 74 | - // if(&ok){ | ||
| 75 | - // QLogger::QLog_Info("Cacic Daemon (Timer)", QString("coleta enviada com sucesso.")); | ||
| 76 | - // } | ||
| 77 | - // } | ||
| 78 | }else{ | 69 | }else{ |
| 79 | QLogger::QLog_Error("Cacic Daemon (Timer)", "Falha na obtenção do arquivo de configuração."); | 70 | QLogger::QLog_Error("Cacic Daemon (Timer)", "Falha na obtenção do arquivo de configuração."); |
| 80 | } | 71 | } |
| @@ -89,6 +80,7 @@ bool CacicTimer::verificarEIniciarQMutex(){ | @@ -89,6 +80,7 @@ bool CacicTimer::verificarEIniciarQMutex(){ | ||
| 89 | if(!cacicthread->isRunning()){ | 80 | if(!cacicthread->isRunning()){ |
| 90 | cMutex->lock(); | 81 | cMutex->lock(); |
| 91 | QLogger::QLog_Info("Cacic Daemon (Timer)", "Semáforo fechado com sucesso."); | 82 | QLogger::QLog_Info("Cacic Daemon (Timer)", "Semáforo fechado com sucesso."); |
| 83 | + return true; | ||
| 92 | }else{ | 84 | }else{ |
| 93 | QLogger::QLog_Info("Cacic Daemon (Timer)", "Possivelmente o gercols travou e será finalizado."); | 85 | QLogger::QLog_Info("Cacic Daemon (Timer)", "Possivelmente o gercols travou e será finalizado."); |
| 94 | try{ | 86 | try{ |
src/ccoleta.cpp
| @@ -7,11 +7,11 @@ CColeta::CColeta(QObject *parent) | @@ -7,11 +7,11 @@ CColeta::CColeta(QObject *parent) | ||
| 7 | 7 | ||
| 8 | void CColeta::coletaHardware() | 8 | void CColeta::coletaHardware() |
| 9 | { | 9 | { |
| 10 | - | ||
| 11 | qDebug() << "coletaHardware() começando sua execução"; | 10 | qDebug() << "coletaHardware() começando sua execução"; |
| 12 | oHardware.iniciaColeta(); | 11 | oHardware.iniciaColeta(); |
| 13 | qDebug() << "coletaHardware() executado"; | 12 | qDebug() << "coletaHardware() executado"; |
| 14 | emit hardwareFinish(); | 13 | emit hardwareFinish(); |
| 14 | + emit beginSoftware(); | ||
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | 17 | ||
| @@ -28,6 +28,7 @@ void CColeta::configuraColetas(){ | @@ -28,6 +28,7 @@ void CColeta::configuraColetas(){ | ||
| 28 | QObject::connect(this, SIGNAL(beginSoftware()), this, SLOT(coletaSoftware())); | 28 | QObject::connect(this, SIGNAL(beginSoftware()), this, SLOT(coletaSoftware())); |
| 29 | QObject::connect(this, SIGNAL(softwareFinish()), this, SLOT(softwareReady())); | 29 | QObject::connect(this, SIGNAL(softwareFinish()), this, SLOT(softwareReady())); |
| 30 | QObject::connect(this, SIGNAL(hardwareFinish()), this, SLOT(hardwareReady())); | 30 | QObject::connect(this, SIGNAL(hardwareFinish()), this, SLOT(hardwareReady())); |
| 31 | + emit beginHardware(); | ||
| 31 | } | 32 | } |
| 32 | 33 | ||
| 33 | bool CColeta::waitToCollect() | 34 | bool CColeta::waitToCollect() |