Files
material-api/web/tasks/once/collect.py

26 lines
614 B
Python
Raw Normal View History

2024-05-29 10:21:31 +08:00
from collectors import Collector
from commons.models.price_publish import PricePublish
2024-05-29 10:21:31 +08:00
def collect(year=2023, month=11):
2024-07-09 18:11:22 +08:00
"""
整理发布价格
"""
PricePublish.clean(year, month) # 清空当月数据
2024-05-29 10:21:31 +08:00
collector = Collector(year, month)
collector.run()
if __name__ == '__main__':
from core.factory import ClientApp
2024-06-05 09:21:00 +08:00
with ClientApp().app_context():
2025-02-21 14:59:26 +08:00
collect(2024, 8)
2024-12-09 17:26:32 +08:00
# for i in range(2, 12):
# collect(2022, i + 1)
# for i in range(0, 12):
# collect(2023, i + 1)
2025-02-21 14:59:26 +08:00
# for i in range(5, 10):
# collect(2024, i + 1)