__init__.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. create_task_record,
  13. fetch_trace_ids_created_after,
  14. update_task_status,
  15. update_task_on_complete,
  16. )
  17. from .store_results import (
  18. upsert_good_authors,
  19. insert_contents,
  20. update_content_plan_ids,
  21. update_web_html_url,
  22. update_process_trace_by_aweme_id,
  23. )
  24. __all__ = [
  25. "get_connection",
  26. "get_open_aigc_pattern_connection",
  27. "get_next_unprocessed_demand",
  28. "get_daily_unprocessed_pool",
  29. "create_task_record",
  30. "fetch_trace_ids_created_after",
  31. "update_task_status",
  32. "update_task_on_complete",
  33. "upsert_good_authors",
  34. "insert_contents",
  35. "update_content_plan_ids",
  36. "update_web_html_url",
  37. "update_process_trace_by_aweme_id",
  38. ]