@@ -28,7 +28,7 @@ class ReqRep:
28
28
def process_call (self , context , channel , req_event , functor ):
29
29
context .hook_server_before_exec (req_event )
30
30
result = functor (* req_event .args )
31
- rep_event = channel .create_event ('OK' , (result ,),
31
+ rep_event = channel .new_event ('OK' , (result ,),
32
32
context .hook_get_task_context ())
33
33
context .hook_server_after_exec (req_event , rep_event )
34
34
channel .emit_event (rep_event )
@@ -55,7 +55,7 @@ def process_call(self, context, channel, req_event, functor):
55
55
xheader = context .hook_get_task_context ()
56
56
for result in iter (functor (* req_event .args )):
57
57
channel .emit ('STREAM' , result , xheader )
58
- done_event = channel .create_event ('STREAM_DONE' , None , xheader )
58
+ done_event = channel .new_event ('STREAM_DONE' , None , xheader )
59
59
# NOTE: "We" made the choice to call the hook once the stream is done,
60
60
# the other choice was to call it at each iteration. I don't think that
61
61
# one choice is better than the other, so I'm fine with changing this
0 commit comments