mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 19:08:52 +08:00
[core worker] Python core worker task execution (#5783)
Executes tasks via the event loop in the C++ core worker. Also properly handles signals (including KeyboardInterrupt), so ctrl-C in a python interactive shell works now (if connecting to an existing cluster).
This commit is contained in:
+5
-1
@@ -505,6 +505,10 @@ class GlobalState(object):
|
||||
node_ip_address = profile_table_message.node_ip_address
|
||||
|
||||
for profile_event_message in profile_table_message.profile_events:
|
||||
try:
|
||||
extra_data = json.loads(profile_event_message.extra_data)
|
||||
except ValueError:
|
||||
extra_data = {}
|
||||
profile_event = {
|
||||
"event_type": profile_event_message.event_type,
|
||||
"component_id": component_id,
|
||||
@@ -512,7 +516,7 @@ class GlobalState(object):
|
||||
"component_type": component_type,
|
||||
"start_time": profile_event_message.start_time,
|
||||
"end_time": profile_event_message.end_time,
|
||||
"extra_data": json.loads(profile_event_message.extra_data),
|
||||
"extra_data": extra_data
|
||||
}
|
||||
|
||||
profile_events.append(profile_event)
|
||||
|
||||
Reference in New Issue
Block a user