API账号到期短信发送

This commit is contained in:
majintao
2024-09-24 13:12:04 +08:00
parent d6beb9df39
commit a97f0262b1
4 changed files with 23 additions and 4 deletions
+2
View File
@@ -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
with DAG(
dag_id="email",
# 每月1日1点运行
dag_id="send_email",
# 每月1日8点运行
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',
task_id='send_email',
bash_command='python /opt/airflow/dags/repo/dags/business/business/send_email.py',
)
t1
+17
View File
@@ -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