def main(): # Initialize logging and set the initial log level logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) # Initialize an environment env = Environment() env.open() # Parse the command line cli = CommandLineParser(env, env.interface['default']) env.cache.flush() env.load_interactive(cli.parse()) cli = None # Override the initial log level logging.getLogger().setLevel(env.ontology['verbosity']) # Initialize a processing queue queue = Queue(env) # Submit a job queue.submit(env.ontology) # execute the next job job = queue.next() job and env.log.debug(u'Job %s history:\n%s', unicode(job), env.encode_json(job.execution)) # Cleanly close the environment env.close()