-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Currently trying to run a function that yields results (is a generator), doesn't work.
Remote function file foo.py:
def func():
for i in range(100):
yield i
if __name__ == '__channelexec__':
for item in channel:
channel.send(eval(item))Execution code:
import remoto, logging, foo
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('otherhostname')
conn = remoto.Connection('otherhostname', logger=logger)
remote_foo = conn.import_module(foo)
foo.func()Received output after executing last line in Execution code:
RuntimeError: DumpError: can't serialize <class 'generator'>
Is there a possible workflow for receiving continuous output from remote function?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels