SchedulerList.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Author renyupeng
  2. # coding=utf-8
  3. # @Time : 2021/11/24 1:37 下午
  4. # @Site :
  5. # @File : SchedulerList.py
  6. # @Software: PyCharm
  7. # @contact: renyupeng@c-top.com.cn
  8. # @Tel 1501435553
  9. class SchedulerList:
  10. def __init__(self):
  11. self.Scheduler_List = {"bytedance_ad_report_daily_dw": "bytedance_ad",
  12. "bytedance_advertiser_report_daily_dw": "bytedance_account",
  13. "bytedance_creative_report_daily_dw": "bytedance_creative",
  14. "bytedance_material_image_report_daily_dw": "bytedance_image",
  15. "bytedance_material_video_report_daily_dw": "bytedance_video",
  16. "bytedance_campaign_report_daily_dw":"bytedance_campaign",
  17. "kuaishou_account_report_daily_dw": "account",
  18. "kuaishou_campaign_report_daily_dw": "campaign",
  19. "kuaishou_material_video_report_daily_dw": "video",
  20. "kuaishou_unit_report_daily_dw": "unit"}
  21. self.Live_Scheduler_List = {
  22. "kuaishou_live_account_report_daily_dw": "ruixuan",
  23. "kuaishou_live_campaign_report_daily_dw": "ruixuan",
  24. "kuaishou_live_unit_report_daily_dw": "ruixuan"}
  25. @classmethod
  26. def SchedulerList(cls, table):
  27. try:
  28. return SchedulerList().Scheduler_List[table]
  29. except KeyError:
  30. return None
  31. @classmethod
  32. def LiveSchedulerList(cls, table):
  33. try:
  34. return SchedulerList().Live_Scheduler_List[table]
  35. except KeyError:
  36. return None