You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you use the streamer with the following example:
with importer.ImportStreamer() as streamer:
streamer.set_sketch(sketch)
streamer.set_timeline_name(timeline_name)
streamer.add_file(path)
streamer.close() # <-- this uploads the data
the data is going to be uploaded twice. Cause in the close there's no check if the streamer was previously closed or not.
To Reproduce
Steps to reproduce the behavior:
Run the provided example
See that events are duplicated
Expected behavior
An error is raised if the importer was already closed.
Additional context
I get that this may be the desired behavior but I saw a line somewhere about calling .close and added it and then only noticed duplicated data. IMO failing (or doing nothing) in such a situation is a better practice. That's how other closable classes usually behave
The text was updated successfully, but these errors were encountered:
Describe the bug
If you use the streamer with the following example:
the data is going to be uploaded twice. Cause in the
close
there's no check if the streamer was previously closed or not.To Reproduce
Steps to reproduce the behavior:
Expected behavior
An error is raised if the importer was already closed.
Additional context
I get that this may be the desired behavior but I saw a line somewhere about calling
.close
and added it and then only noticed duplicated data. IMO failing (or doing nothing) in such a situation is a better practice. That's how other closable classes usually behaveThe text was updated successfully, but these errors were encountered: