__init__.py 977 B

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