API用户使用及明细的邮件发送
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
from goojia_utils import KAFKA_CLIENT
|
||||
KAFKA_CLIENT.send_message("email-data-topic","sendEmail")
|
||||
@@ -0,0 +1,17 @@
|
||||
from airflow.operators.bash import BashOperator
|
||||
import pendulum
|
||||
from airflow import DAG
|
||||
|
||||
with DAG(
|
||||
dag_id="email",
|
||||
# 每月1日1点运行
|
||||
schedule_interval="0 8 1 * *",
|
||||
start_date=pendulum.datetime(2024, 8, 30, tz="Asia/Shanghai"),
|
||||
catchup=True,
|
||||
description="API用户使用及明细的邮件发送"
|
||||
) as dag:
|
||||
t1 = BashOperator(
|
||||
task_id='email',
|
||||
bash_command='python /opt/airflow/dags/repo/dags/business/business/email.py',
|
||||
)
|
||||
t1
|
||||
Reference in New Issue
Block a user