Created
July 7, 2016 06:17
-
-
Save r39132/b92e6069fad6a2351cfe586013434af2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from airflow import configuration as conf | |
from airflow import DAG | |
from airflow.operators import BashOperator | |
from datetime import datetime | |
# build DAG | |
default_args = { | |
'owner': 'jrideout', | |
'pool': 'ep_generate_spoofs', | |
'depends_on_past': False, | |
'start_date': datetime.now(), | |
'email': ['[email protected]'], | |
'email_on_failure': True, | |
'email_on_retry': True | |
} | |
dag = DAG('generate_spoofs_v3', default_args=default_args, schedule_interval='@weekly') | |
# Load the agari_spoofs.yaml and extract all of the msg_ids! | |
#import yaml | |
#f = open('/home/depot/') | |
# use safe_load instead load | |
#dataMap = yaml.safe_load(f) | |
#f.close() | |
inject_new_spoofs_command = """python {{ params.dags_folder }}/generate_spoofed_message.py""" | |
build_sender_models_spark_job = BashOperator( | |
task_id='inject_new_spoofs', | |
bash_command=inject_new_spoofs_command, | |
params={"dags_folder":conf.get('core', 'dags_folder')}, | |
dag=dag) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment