forked from ScoDoc/ScoDoc
Update opolka/ScoDoc from ScoDoc/ScoDoc #2
@ -362,11 +362,13 @@ def migrate_dept(dept_name: str, stats: _Statistics, time_elapsed: Profiler):
|
|||||||
print(
|
print(
|
||||||
f"{TerminalColor.RED}{statistiques['total']} absences qui n'ont pas pu être migrées."
|
f"{TerminalColor.RED}{statistiques['total']} absences qui n'ont pas pu être migrées."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filename = f"/opt/scodoc-data/log/{datetime.now().strftime('%Y-%m-%dT%H:%M:%S')}scodoc_migration_abs_{dept_name}.json"
|
||||||
print(
|
print(
|
||||||
f"Vous retrouverez un fichier json {TerminalColor.GREEN}/opt/scodoc-data/log/scodoc_migration_abs_{dept_name}.json{TerminalColor.RED} contenant les problèmes de migrations"
|
f"Vous retrouverez un fichier json {TerminalColor.GREEN}{filename}{TerminalColor.RED} contenant les problèmes de migrations"
|
||||||
)
|
)
|
||||||
with open(
|
with open(
|
||||||
f"/opt/scodoc-data/log/scodoc_migration_abs_{dept_name}.json",
|
filename,
|
||||||
"w",
|
"w",
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
) as file:
|
) as file:
|
||||||
|
Loading…
Reference in New Issue
Block a user