Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def task_update(ctx, task_name):
"""
Update the task definition for the specified task.
"""
task = Task(task_name, config=ctx.obj['CONFIG'])
task.update()
def task_unschedule(ctx, task_name):
"""
Unschedule the specified task.
"""
task = Task(task_name, config=ctx.obj['CONFIG'])
task.unschedule()
def task_run(ctx, task_name, wait):
"""
Run the specified task, and if wait is true, wait for the task to finish and display
any logs.
"""
task = Task(task_name, config=ctx.obj['CONFIG'])
try:
task.run(wait)
except:
click.echo("There was an unspecified error running this task.")
def task_write_config(ctx, task_name, dry_run):
"""
If the task TASK_NAME has a "config:" section defined, write
all of the parameters for the task to AWS Parameter Store.
"""
task = Task(task_name, config=ctx.obj['CONFIG'])
_write_config(task, task_name, dry_run)
def task_schedule(ctx, task_name):
"""
Schedule the specified task according to the schedule expression defined in the yml file.
"""
task = Task(task_name, config=ctx.obj['CONFIG'])
task.schedule()
def task_show_config(ctx, task_name, diff, to_env_file):
"""
If the task TASK_NAME has a "config:" section defined, print a list of
all parameters for the task and the values they currently have in AWS.
"""
task = Task(task_name, config=ctx.obj['CONFIG'])
_show_config(task, task_name, diff, to_env_file)