def main(argv): args = sys.argv[1:] if len(args) != 1: usage() path = args[0] ingestNexus = IngestNexus(path) ingestNexus.execute() ingestNexus.logout() sys.exit(0)
def catalogRaw(self): try: logging.info("called /queue/" + self.conf.catalog_started + " --- " + json.dumps(self.data)) self.send('/queue/'+self.conf.catalog_started, json.dumps(self.data)) ingestNexus = IngestNexus(self.data_file) ingestNexus.execute() ingestNexus.logout() self.send('/queue/'+self.conf.catalog_complete, json.dumps(self.data)) logging.info("called /queue/"+self.conf.catalog_complete + " --- " + json.dumps(self.data)) except Exception, e: self.data["error"] = "CATALOG Error: %s" % e logging.error("called /queue/"+self.conf.catalog_error + " --- " + json.dumps(self.data)) self.send('/queue/'+self.conf.catalog_error, json.dumps(self.data))