Closed rockets3600 closed 4 years ago
Think this would address https://github.com/infostellarinc/stellarcli/issues/122
@rockets3600 could you explain the usage and expected behaviour in the PR description? Thanks!
@chelliwell We're curious about what you think concerning the flag usage for this. Is it okay to use the default values for delay and close time if they are not provided? Or would you prefer that if auto-close is on, the delay and close time must be set explicitly. Thanks!
Also curious about the layout of params
--enable-auto-close true --auto-close-delay duration 5s --auto-close-time 2006-01-02'T'15:04:05Z
vs
--auto-close 5s 2006-01-02'T'15:04:05Z
@chelliwell We're curious about what you think concerning the flag usage for this. Is it okay to use the default values for delay and close time if they are not provided? Or would you prefer that if auto-close is on, the delay and close time must be set explicitly. Thanks!
I see that you've edited the top message in this thread. Is that now the up-to-date description of the parameters?
@chelliwell We're curious about what you think concerning the flag usage for this. Is it okay to use the default values for delay and close time if they are not provided? Or would you prefer that if auto-close is on, the delay and close time must be set explicitly. Thanks!
I see that you've edited the top message in this thread. Is that now the up-to-date description of the parameters?
The description is a bit outdated right now. I'll update it once things are more settled and let you know that I've done so.
Tested several times with auto close time set before and after the expected end of data transmission and saw good results.
One thing I didn't see documented anywhere is the behaviour of when the auto close time is set after the end of expected transmission. In my tests the stream closed 10s after the provided time, but it wasn't immediately obvious where the 10s came from.
To clarify my last comment, the stream is closed at the provided timestamp + specified duration + stream latency. In my example I used a 5s duration and stream latency was ~5s so the stream was closed after 10 seconds. We can look into this duration at a later date.
There are three new flags for satellite open-stream. --enable-auto-close When set to true, the stream will close after a specified auto close time. --auto-close-delay duration The duration to wait before ending the stream with no more data incoming. (default 5s) --auto-close-time string The datetime after which auto-closing will be enabled. (ie "2019-12-02 15:04:05")
When enabled the stream runs normally until "auto-close-time" has passed. After this point, if no telemetry is received for "auto-close-delay" time (default 5s), then the stream will close, the file-writer is flushed (if writing to a file), and the stellarcli will close. If telemetry is received during the auto close delay period, the delay will be refreshed back to it's initial setting and will countdown to exiting again.