123456789101112131415161718192021222324252627 |
- import warnings
- warnings.filterwarnings('ignore')
- from apscheduler.schedulers.blocking import BlockingScheduler
- from sync_amz_data.public import sp_api_client
- def func_run():
- try:
- sp_api_client.SpApiRequest.get_allShops("GET_FLAT_FILE_OPEN_LISTINGS_DATA")
- except:
- sp_api_client.SpApiRequest.get_allShops("GET_FLAT_FILE_OPEN_LISTINGS_DATA")
- print("="*40)
- print("="*40)
- print("="*40)
- try:
- sp_api_client.SpApiRequest.listing_infoTable()
- except:
- sp_api_client.SpApiRequest.listing_infoTable()
- sp_api_client.SpApiRequest.Goods_drop_duplicates()
- # func_run()
- #
- #
- if __name__ == '__main__':
- sched = BlockingScheduler()
- sched.add_job(func_run,'cron',hour=4,minute=30,second=0)
- sched.start()
|