def dummy_executor(): config = wrenconfig.default() AWS_REGION = config['account']['aws_region'] S3_BUCKET = config['s3']['bucket'] S3_PREFIX = config['s3']['pywren_prefix'] invoker = invokers.DummyInvoker() return Executor(AWS_REGION, S3_BUCKET, S3_PREFIX, invoker, config, 100)
def azure_executor(config=None, job_max_runtime=100): if config is None: config = wrenconfig.default() QUEUE_NAME = config["az"]["queue_name"] ACCOUNT_NAME = config["az"]["account_name"] ACCESS_KEY = config["az"]["access_key"] invoker = invokers.AzureInvoker(ACCOUNT_NAME, ACCESS_KEY, QUEUE_NAME) return Executor(invoker, config, job_max_runtime)
def gcf_executor(config=None, job_max_runtime=200): if config is None: config = wrenconfig.default() REGION = config['google_account']['region'] FUNCTION_NAME = config['google_function']['function_name'] PROJECT = config['google_account']['project'] invoker = invokers.GCFInvoker(REGION, FUNCTION_NAME, PROJECT) logger.info('using google executor') return Executor(invoker, config, job_max_runtime)
def remote_executor(config=None, job_max_runtime=3600): if config is None: config = wrenconfig.default() AWS_REGION = config['account']['aws_region'] SQS_QUEUE = config['standalone']['sqs_queue_name'] S3_BUCKET = config['s3']['bucket'] S3_PREFIX = config['s3']['pywren_prefix'] invoker = invokers.SQSInvoker(AWS_REGION, SQS_QUEUE) return Executor(AWS_REGION, S3_BUCKET, S3_PREFIX, invoker, config, job_max_runtime)
def dummy_executor(config=None, job_max_runtime=100): if config is None: config = wrenconfig.default() AWS_REGION = config['account']['aws_region'] S3_BUCKET = config['s3']['bucket'] S3_PREFIX = config['s3']['pywren_prefix'] RUNTIME_S3_BUCKET = config['runtime']['s3_bucket'] RUNTIME_S3_KEY = config['runtime']['s3_key'] invoker = invokers.DummyInvoker() return Executor(AWS_REGION, S3_BUCKET, S3_PREFIX, invoker, RUNTIME_S3_BUCKET, RUNTIME_S3_KEY, job_max_runtime)
def local_executor(invoker_object=None, config=None, job_max_runtime=300): if config is None: config = wrenconfig.default() if invoker_object is None: if "local_run_dir" in config: invoker = invokers.LocalInvoker(run_dir=config["local_run_dir"]) else: invoker = invokers.LocalInvoker() else: invoker = invoker_object return Executor(invoker, config, job_max_runtime)
def lambda_executor(config=None, job_max_runtime=280): if config is None: config = wrenconfig.default() AWS_REGION = config['account']['aws_region'] FUNCTION_NAME = config['lambda']['function_name'] S3_BUCKET = config['s3']['bucket'] S3_PREFIX = config['s3']['pywren_prefix'] invoker = invokers.LambdaInvoker(AWS_REGION, FUNCTION_NAME) return Executor(AWS_REGION, S3_BUCKET, S3_PREFIX, invoker, config, job_max_runtime)