-
Notifications
You must be signed in to change notification settings - Fork 34
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
Script apis #1803
Script apis #1803
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1803 +/- ##
==========================================
- Coverage 79.49% 79.44% -0.05%
==========================================
Files 521 523 +2
Lines 40813 40866 +53
==========================================
+ Hits 32445 32468 +23
- Misses 8368 8398 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@details[:state] = @state | ||
@details[:line_no] = @current_line_number | ||
@details[:update_time] = Time.now.to_s | ||
OpenC3::StoreQueued.set("running-script:#{@id}", @details.as_json(:allow_nan => true).to_json(:allow_nan => true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the as_json
needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so ... I was following the pattern in spawn
. as_json
converts the symbol keys to strings and then to_json
converts the entire thing to a json string. Not sure if as_json
is explicitly required but it doesn't hurt.
@@ -51,6 +51,7 @@ def index | |||
else | |||
limit = ((stop - start) / 60).to_i # 1 event every minute ... shouldn't ever be more than this! | |||
end | |||
puts "activities index limit:#{limit}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove debug code.
@@ -54,6 +54,7 @@ def delete | |||
if running_script | |||
target_name = running_script['name'].split('/')[0] | |||
return unless authorization('script_run', target_name: target_name) | |||
ActionCable.server.broadcast("cmd-running-script-channel:#{params[:id]}", "stop") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is missing script_api: at the beginning of the stream name...?
|
No description provided.