Skip to content

Commit e9684b2

Browse files
feat: log project files hash on save
1 parent 5ee36de commit e9684b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/writer/wf_project.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ def write_files(app_path: str, metadata: MetadataDefinition, components: Dict[st
8282
_write_root_files(wf_directory, components, context)
8383
_write_component_files(wf_directory, components, context)
8484
_remove_obsolete_component_files(wf_directory, components)
85-
logger.info("Saved. Time elapsed: %.4fs", time.time() - time_start)
85+
project_hash = hashlib.md5()
86+
for filename in sorted(context.file_hashes.keys()):
87+
file_hash = context.file_hashes[filename]
88+
project_hash.update(bytes.fromhex(file_hash))
89+
logger.info("Saved. Time elapsed: %.4fs. Hash: %s", time.time() - time_start, project_hash.hexdigest())
8690

8791

8892
def start_process_write_files_async(context: WfProjectContext, save_interval: float) -> None:

0 commit comments

Comments
 (0)