Skip to content

Commit 0576d71

Browse files
committed
refactor(dag:DISCORD_PROPOSAL_REMINDER_v3): remove unnessary kwargs
1 parent 53cbf7a commit 0576d71

File tree

1 file changed

+9
-6
lines changed
  • dags/app/proposal_reminder

1 file changed

+9
-6
lines changed

dags/app/proposal_reminder/dag.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@
2828
def DISCORD_PROPOSAL_REMINDER_v3():
2929
@task
3030
def SEND_PROPOSAL_SUMMARY():
31+
webhook_url = Variable.get("DISCORD_PROGRAM_REMINDER_WEBHOOK")
32+
3133
summary = get_proposal_summary()
3234
n_talk = summary["num_proposed_talk"]
3335
n_tutorial = summary["num_proposed_tutorial"]
34-
kwargs = {
35-
"webhook_url": Variable.get("DISCORD_PROGRAM_REMINDER_WEBHOOK"),
36-
"username": "Program talk reminder",
37-
"msg": f"目前投稿議程數: {n_talk}; 課程數: {n_tutorial}",
38-
}
39-
discord.send_webhook_message(**kwargs)
36+
msg = f"目前投稿議程數: {n_talk}; 課程數: {n_tutorial}"
37+
38+
discord.send_webhook_message(
39+
webhook_url=webhook_url,
40+
username="Program talk reminder",
41+
msg=msg,
42+
)
4043

4144
SEND_PROPOSAL_SUMMARY()
4245

0 commit comments

Comments
 (0)