schrodinger.job.driver_decorator module

Main function decorator designed for backend jobs. For example:

@driver_decorator.main_wrapper("A super nifty backend")
def main():
    do_some_cool_work()

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.job.driver_decorator.main_wrapper(func, driver_name='Job', *args, **kwargs)

The backend job’s application header string is logged only if job is running under jobcontrol.

Running time is logged after job succeeds, or when an exception is caught. Running time won’t be logged if sys.exit() in called inside main(), or job is terminated via keyboard interruption.