Переглянути джерело

account association improve

luojunhui 3 місяців тому
батько
коміт
2c650c624a
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      account_association_task.py

+ 3 - 2
account_association_task.py

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