__init__.py 671 B

1234567891011121314151617181920212223242526
  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 .schedule import (
  9. get_next_unprocessed_demand,
  10. create_task_record,
  11. update_task_status,
  12. update_task_on_complete,
  13. )
  14. from .store_results import upsert_good_authors, insert_contents
  15. __all__ = [
  16. "get_connection",
  17. "get_next_unprocessed_demand",
  18. "create_task_record",
  19. "update_task_status",
  20. "update_task_on_complete",
  21. "upsert_good_authors",
  22. "insert_contents",
  23. ]