Exemple #1
0
 def handle(self, *args, **options):
     _errlog("running doomlister {0}".format(_now()))
     with tempfile.TemporaryFile() as f:
         p = subprocess.Popen(['doomlister'], stdout=f)
         if p.wait() != 0:
             raise Exception('doomlister failed')
         _errlog("doomlister completed successfully")
         f.seek(0)
         data = f.read()
     _errlog("putting data to database")
     serverdatarefinery.put_json_to_database(timezone.now(), data)
     _errlog("collecting completed {0}".format(_now()))
     _errlog("building presentation")
     build_presentation(incremental=True)
     _errlog("completed building presentation {0}".format(_now()))
 def handle(self, *args, **options):
     incremental = options["incremental"]
     build.build_presentation(incremental)