__init__.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. """
  2. 数据库封装模块
  3. - connection: 共享数据库连接
  4. - schedule: 定时任务相关(demand_content、demand_find_task)
  5. - store_results: 推荐结果写入(demand_find_author、demand_find_content_result)
  6. """
  7. from .connection import get_connection
  8. from .open_aigc_pattern_connection import get_open_aigc_pattern_connection
  9. from .schedule import (
  10. get_next_unprocessed_demand,
  11. get_daily_unprocessed_pool,
  12. get_first_running_task,
  13. get_one_today_unprocessed_demand,
  14. create_task_record,
  15. fetch_trace_ids_created_after,
  16. update_task_status,
  17. update_task_on_complete,
  18. )
  19. from .store_results import (
  20. fetch_demand_content_dt,
  21. fetch_demand_content_merge_leve2,
  22. upsert_good_authors,
  23. insert_contents,
  24. update_content_plan_ids,
  25. update_web_html_url,
  26. update_process_trace_by_aweme_id,
  27. )
  28. __all__ = [
  29. "get_connection",
  30. "get_open_aigc_pattern_connection",
  31. "get_next_unprocessed_demand",
  32. "get_daily_unprocessed_pool",
  33. "get_first_running_task",
  34. "get_one_today_unprocessed_demand",
  35. "create_task_record",
  36. "fetch_trace_ids_created_after",
  37. "update_task_status",
  38. "update_task_on_complete",
  39. "fetch_demand_content_dt",
  40. "fetch_demand_content_merge_leve2",
  41. "upsert_good_authors",
  42. "insert_contents",
  43. "update_content_plan_ids",
  44. "update_web_html_url",
  45. "update_process_trace_by_aweme_id",
  46. ]