Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RSDK-1616] Do not attempt to sync empty sensor reading files #1716

Merged
merged 5 commits into from
Dec 29, 2022
Merged
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions services/datamanager/datasync/upload_data_capture_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ func uploadDataCaptureFile(ctx context.Context, client v1.DataSyncServiceClient,
return err
}

// Do not attempt to upload a file without any sensor readings, which occurs when syncing more frequently than capturing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the post , part can be left out, since there are other cases where this would also apply (e.g. restarting/disabling/changing before first write)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

if len(sensorData) == 0 {
return nil
}

ur := &v1.DataCaptureUploadRequest{
Metadata: &v1.UploadMetadata{
PartId: partID,
Expand Down