18 lines
581 B
Python
18 lines
581 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""Convert 2022 dates only."""
|
||
|
|
import sys
|
||
|
|
sys.path.insert(0, r'C:\Users\Lenovo\Documents\- DOLPHIN NG HD HCM TSF Predict\prod')
|
||
|
|
from continuous_convert import convert_one, get_dates, log
|
||
|
|
|
||
|
|
def main():
|
||
|
|
arrow, parquet = get_dates()
|
||
|
|
to_do = sorted(d for d in (arrow - parquet) if d.startswith('2022-'))
|
||
|
|
log(f'2022: {len(to_do)} dates to convert')
|
||
|
|
for i, d in enumerate(to_do):
|
||
|
|
ok, status = convert_one(d)
|
||
|
|
if (i+1) % 5 == 0:
|
||
|
|
log(f'2022: {i+1}/{len(to_do)} done')
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
main()
|