add reason_type to suspend table and disable US daily data fetch
This commit is contained in:
parent
483c357fd1
commit
91a8536cc1
@ -115,6 +115,7 @@ SCHEMA_STATEMENTS: Iterable[str] = (
|
|||||||
suspend_timing TEXT,
|
suspend_timing TEXT,
|
||||||
resume_timing TEXT,
|
resume_timing TEXT,
|
||||||
reason TEXT,
|
reason TEXT,
|
||||||
|
reason_type TEXT,
|
||||||
PRIMARY KEY (ts_code, suspend_date)
|
PRIMARY KEY (ts_code, suspend_date)
|
||||||
);
|
);
|
||||||
""",
|
""",
|
||||||
|
|||||||
@ -1401,23 +1401,36 @@ def fetch_hk_daily(start: date, end: date, ts_code: str) -> Iterable[Dict]:
|
|||||||
return _df_to_records(df, _TABLE_COLUMNS["hk_daily"])
|
return _df_to_records(df, _TABLE_COLUMNS["hk_daily"])
|
||||||
|
|
||||||
|
|
||||||
|
# def fetch_us_daily(start: date, end: date, ts_code: str) -> Iterable[Dict]:
|
||||||
|
# client = _ensure_client()
|
||||||
|
# start_str = _format_date(start)
|
||||||
|
# end_str = _format_date(end)
|
||||||
|
# LOGGER.info(
|
||||||
|
# "拉取美股日线:%s %s-%s",
|
||||||
|
# ts_code,
|
||||||
|
# start_str,
|
||||||
|
# end_str,
|
||||||
|
# extra=LOG_EXTRA,
|
||||||
|
# )
|
||||||
|
# df = _fetch_paginated(
|
||||||
|
# "us_daily",
|
||||||
|
# {"ts_code": ts_code, "start_date": start_str, "end_date": end_str},
|
||||||
|
# limit=4000,
|
||||||
|
# )
|
||||||
|
# return _df_to_records(df, _TABLE_COLUMNS["us_daily"])
|
||||||
|
|
||||||
|
|
||||||
def fetch_us_daily(start: date, end: date, ts_code: str) -> Iterable[Dict]:
|
def fetch_us_daily(start: date, end: date, ts_code: str) -> Iterable[Dict]:
|
||||||
client = _ensure_client()
|
"""Disabled fetch: 美股日线拉取已停用,返回空结果。"""
|
||||||
start_str = _format_date(start)
|
|
||||||
end_str = _format_date(end)
|
|
||||||
LOGGER.info(
|
LOGGER.info(
|
||||||
"拉取美股日线:%s %s-%s",
|
"美股日线拉取已禁用,跳过 %s %s-%s",
|
||||||
ts_code,
|
ts_code,
|
||||||
start_str,
|
_format_date(start),
|
||||||
end_str,
|
_format_date(end),
|
||||||
extra=LOG_EXTRA,
|
extra=LOG_EXTRA,
|
||||||
)
|
)
|
||||||
df = _fetch_paginated(
|
return []
|
||||||
"us_daily",
|
|
||||||
{"ts_code": ts_code, "start_date": start_str, "end_date": end_str},
|
|
||||||
limit=4000,
|
|
||||||
)
|
|
||||||
return _df_to_records(df, _TABLE_COLUMNS["us_daily"])
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user