Skip to content

Commit

Permalink
Merge pull request #129 from pycontw/finance-fix4
Browse files Browse the repository at this point in the history
fix discord no information
  • Loading branch information
xchwan authored Oct 7, 2023
2 parents 6085244 + 71bd784 commit ba1151b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dags/app/finance_bot/udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ def main() -> None:
# link to bigquery and write xls file
write_to_bigquery(df_diff)
# push to discord
webhook_url = Variable.get("discord_data_stratagy_webhook")
username = "財務機器人"
msg = refine_diff_df_to_string(df_diff)
if msg != "no data":
discord.send_webhook_message(webhook_url, username, msg)
kwargs = {
"webhook_url": Variable.get("discord_data_stratagy_webhook"),
"username": "財務機器人",
"msg": refine_diff_df_to_string(df_diff),
}
if kwargs["msg"] != "no data":
discord.send_webhook_message(**kwargs)


def df_difference(df_xls, df_bigquery) -> pd.DataFrame:
Expand Down

0 comments on commit ba1151b

Please sign in to comment.