forked from ScoDoc/ScoDoc
Assiduités : Migration -> date dans les noms de fichiers log
This commit is contained in:
parent
3326001289
commit
1dbec9231b
@ -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