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

Added logs when an activity is about to be uploaded #214

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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