Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Added logs when an activity is about to be uploaded (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevforget authored Oct 18, 2022
1 parent 05c28e0 commit 455d0d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tapiriik/sync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,9 @@ def Run(self, exhaustive=False, null_next_sync_on_unlock=False, heartbeat_callba
if heartbeat_callback:
heartbeat_callback(SyncStep.Upload)
destSvc = destinationSvcRecord.Service

self._global_logger.info(f"[ACTIVITY UPLOAD] - Ready to upload activity for hub user id {self.user['_id']} from partner {activity_origin_partner_name} with source partner activity id {origin_partner_activity_id} to destination partner {destSvc.ID}")

if not destSvc.ReceivesStationaryActivities and full_activity.Stationary:
self._global_logger.info("\t...marked as stationary during download")
activity.Record.MarkAsNotPresentOn(destinationSvcRecord, UserException(UserExceptionType.StationaryUnsupported))
Expand All @@ -1256,7 +1259,6 @@ def Run(self, exhaustive=False, null_next_sync_on_unlock=False, heartbeat_callba
continue

uploaded_external_id = None
self._global_logger.info("\t Uploading to " + destSvc.ID)
try:
uploaded_external_id = self._uploadActivity(full_activity, destinationSvcRecord)
except UploadException:
Expand Down

0 comments on commit 455d0d1

Please sign in to comment.