__init__.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. upsert_good_authors,
  22. insert_contents,
  23. update_content_plan_ids,
  24. update_web_html_url,
  25. update_process_trace_by_aweme_id,
  26. )
  27. __all__ = [
  28. "get_connection",
  29. "get_open_aigc_pattern_connection",
  30. "get_next_unprocessed_demand",
  31. "get_daily_unprocessed_pool",
  32. "get_first_running_task",
  33. "get_one_today_unprocessed_demand",
  34. "create_task_record",
  35. "fetch_trace_ids_created_after",
  36. "update_task_status",
  37. "update_task_on_complete",
  38. "fetch_demand_content_dt",
  39. "upsert_good_authors",
  40. "insert_contents",
  41. "update_content_plan_ids",
  42. "update_web_html_url",
  43. "update_process_trace_by_aweme_id",
  44. ]