Browse Source

account association improve

luojunhui 3 months ago
parent
commit
2c650c624a
1 changed files with 3 additions and 2 deletions
  1. 3 2
      account_association_task.py

+ 3 - 2
account_association_task.py

@@ -23,10 +23,11 @@ def main():
     args = parser.parse_args()
 
     if args.run_date:
-        biz_date = datetime.strptime(args.run_date, "%Y-%m-%d")
+        biz_date_str = args.run_date
     else:
-        biz_date = datetime.today()
+        biz_date_str = datetime.today().strftime('%Y-%m-%d')
     try:
+        biz_date = datetime.strptime(biz_date_str, "%Y-%m-%d")
         account_association_crawler = AccountAssociationCrawler()
         account_association_crawler.run_account_association(biz_date=biz_date)
     except Exception as e: