Logging: log time spent to upload build artifacts
Start collecting how much time (in seconds) it takes to upload all the build
artifacts for each project.
Related
@@ -517,6 +517,7 @@ class UpdateDocsTask(SyncRepositoryMixin, Task):
pdf = self.data.outcomes['pdf']
epub = self.data.outcomes['epub']
+ time_before_store_build_artifacts = timezone.now()
# Store build artifacts to storage (local or cloud storage)
self.store_build_artifacts(
html=html,
@@ -525,6 +526,10 @@ class UpdateDocsTask(SyncRepositoryMixin, Task):
pdf=pdf,
epub=epub,
)
+ log.info(
+ "Store build artifacts finished.",
+ time=(timezone.now() - time_before_store_build_artifacts).seconds,
+ )
# NOTE: we are updating the db version instance *only* when
# HTML are built successfully.
