Commit 731e5585adb3be911e2cf348dc98ae1108234e5d

Authored by Eric Menezes Noronha
2 parents 4ac20801 4e963c3c
Exists in master

Merge branch 'master' of https://github.com/lightbase/cacic-agente

cacic-daemon/cacicD/cacictimer.cpp
... ... @@ -66,15 +66,6 @@ void CacicTimer::mslot(){
66 66 cacicthread->setCMutex(cMutex);
67 67 cacicthread->setModuloDirPath(getDirProgram());
68 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 69 }else{
79 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 80 if(!cacicthread->isRunning()){
90 81 cMutex->lock();
91 82 QLogger::QLog_Info("Cacic Daemon (Timer)", "Semáforo fechado com sucesso.");
  83 + return true;
92 84 }else{
93 85 QLogger::QLog_Info("Cacic Daemon (Timer)", "Possivelmente o gercols travou e será finalizado.");
94 86 try{
... ...
src/ccoleta.cpp
... ... @@ -7,11 +7,11 @@ CColeta::CColeta(QObject *parent)
7 7  
8 8 void CColeta::coletaHardware()
9 9 {
10   -
11 10 qDebug() << "coletaHardware() começando sua execução";
12 11 oHardware.iniciaColeta();
13 12 qDebug() << "coletaHardware() executado";
14 13 emit hardwareFinish();
  14 + emit beginSoftware();
15 15 }
16 16  
17 17  
... ... @@ -28,6 +28,7 @@ void CColeta::configuraColetas(){
28 28 QObject::connect(this, SIGNAL(beginSoftware()), this, SLOT(coletaSoftware()));
29 29 QObject::connect(this, SIGNAL(softwareFinish()), this, SLOT(softwareReady()));
30 30 QObject::connect(this, SIGNAL(hardwareFinish()), this, SLOT(hardwareReady()));
  31 + emit beginHardware();
31 32 }
32 33  
33 34 bool CColeta::waitToCollect()
... ...