Commit 136cbba2fbfd57e1a4a780f4b06e53e1e279183f
Committed by
Eduardo Santos
Exists in
master
Exporta os contadores após finalizar as coletas
Showing
1 changed file
with
6 additions
and
3 deletions
Show diff stats
cocar/commands/scan_commands.py
| @@ -299,8 +299,11 @@ class ScanCommands(command.Command): | @@ -299,8 +299,11 @@ class ScanCommands(command.Command): | ||
| 299 | 299 | ||
| 300 | while True: | 300 | while True: |
| 301 | self.get_printers() | 301 | self.get_printers() |
| 302 | - log.info("SCAN DE IMPRESSORAS FINALIZADO!!! Dormindo...") | ||
| 303 | - time.sleep(600) | 302 | + log.info("SCAN DE IMPRESSORAS FINALIZADO!!! Iniciando export de coletores") |
| 303 | + | ||
| 304 | + self.export_printers() | ||
| 305 | + log.info("EXPORT DE IMPRESSORAS FINALIZADO!!! Reiniciando as coletas") | ||
| 306 | + #time.sleep(600) | ||
| 304 | 307 | ||
| 305 | def export_printers(self): | 308 | def export_printers(self): |
| 306 | """ | 309 | """ |
| @@ -528,7 +531,7 @@ class ScanCommands(command.Command): | @@ -528,7 +531,7 @@ class ScanCommands(command.Command): | ||
| 528 | session.add(printer) | 531 | session.add(printer) |
| 529 | session.flush() | 532 | session.flush() |
| 530 | except IntegrityError, e: | 533 | except IntegrityError, e: |
| 531 | - log.info("Impressora %s já cadastrada", elm['network_ip']) | 534 | + log.info("Impressora %s ja cadastrada", elm['network_ip']) |
| 532 | 535 | ||
| 533 | session.close() | 536 | session.close() |
| 534 | 537 |