conductor-sdk / conductor-python

Conductor OSS SDK for Python programming language
Apache License 2.0
52 stars 26 forks source link

[Bug] Worker with generic input and output is not supported #234

Closed george-kirkman closed 5 months ago

george-kirkman commented 6 months ago

Hi there!

There was work done last year to enhance the Worker to be able to execute functions with generic input/output, instead of Task/TaskResult: https://github.com/conductor-sdk/conductor-python/pull/116

This PR missed a line. It creates an execute_function_input which is either task or task.input_data, based on whether the function expects a Task or not, but it consumes task instead of execute_function_input on L66, thereby forgetting what it knew about the function's input parameter type.

L66 should read: task_result.output_data = self.execute_function(execute_function_input) instead of task_result.output_data = self.execute_function(task).

v1r3n commented 5 months ago

Hi @george-kirkman this is addressed in the latest version now.