Skip to content

Commit

Permalink
feat(kz_dash): 任务相关公用部分迁移
Browse files Browse the repository at this point in the history
  • Loading branch information
kingzeus committed Dec 21, 2024
1 parent a629e52 commit 780ced3
Show file tree
Hide file tree
Showing 27 changed files with 41 additions and 2,093 deletions.
4 changes: 1 addition & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
from models.account import ModelAccount, ModelPortfolio
from models.fund import ModelFund, ModelFundNav
from models.fund_user import ModelFundPosition, ModelFundTransaction
from models.task import ModelTask
from pages.account import render_account_page
from pages.home import render_home_page
from pages.task import render_task_page
from kz_dash.page.task.task_page import render_task_page
from pages.transaction import render_transaction_page


Expand Down Expand Up @@ -62,7 +61,6 @@ def init_application():
ModelFundTransaction,
ModelFundNav,
ModelFund,
ModelTask,
]
)
logger.info("数据库初始化成功")
Expand Down
6 changes: 3 additions & 3 deletions backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from backend.api.fund import api as fund_ns
from backend.api.portfolio import api as portfolio_ns
from kz_dash.backend.api.runtime import api as runtime_ns
from backend.api.task import api as task_ns
from kz_dash.backend.api.task import api as task_ns
from config import API_CONFIG
from scheduler.job_manager import JobManager
from scheduler.tasks import init_tasks
from kz_dash.scheduler.job_manager import JobManager
from task.task_init import init_tasks


def register_blueprint(app):
Expand Down
134 changes: 0 additions & 134 deletions backend/api/task.py

This file was deleted.

2 changes: 1 addition & 1 deletion data_source/implementations/eastmoney.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bs4 import BeautifulSoup

from data_source.interface import IDataSource
from scheduler.tasks.base import FundType
from task.task_config import FundType
from kz_dash.utility.datetime_helper import format_date, get_timestamp, get_timestamp_ms
from kz_dash.utility.string_helper import (
extract_number_with_unit,
Expand Down
2 changes: 1 addition & 1 deletion kz_dash
Submodule kz_dash updated from 69bf4e to 9a6f0b
2 changes: 1 addition & 1 deletion models/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_fund_transactions(portfolio_id: str) -> List[Dict[str, Any]]:

def get_statistics() -> Dict[str, int]:
"""获取统计数据"""
from scheduler.tasks import TaskStatus
from kz_dash.scheduler.base_task import TaskStatus

stats = {
# main db
Expand Down
19 changes: 0 additions & 19 deletions pages/task/__init__.py

This file was deleted.

Loading

0 comments on commit 780ced3

Please sign in to comment.