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