Ejemplo n.º 1
0
 def run(self):
     from SimpleSeer.Backup import Backup
     
     listen = self.options.listen
     
     Backup.exportAll()
     
     if listen.upper() == 'TRUE': 
         gevent.spawn_link_exception(Backup.listen())
Ejemplo n.º 2
0
 def run(self):
     from SimpleSeer.Backup import Backup
     
     if self.options.subsubcommand != 'import' and self.options.subsubcommand != 'export':
         self.log.info("Valid subcommands are import and export.  Ignoring \"{}\".".format(self.options.subsubcommand))
     if self.options.subsubcommand == "export" and self.options.clean:
         self.log.info("Clean option not applicable when exporting.  Ignoring")
     if self.options.subsubcommand == "import" and self.options.listen:
         self.log.info("Listen option not applicable when importing.  Ignorning")
     
     if self.options.subsubcommand == "export":
         Backup.exportAll()
         if self.options.listen: 
             gevent.spawn_link_exception(Backup.listen())
     elif self.options.subsubcommand == "import":
         Backup.importAll(self.options.file, self.options.clean, self.options.skipbackfill)