Skip to content

Conversation

@cretz
Copy link
Member

@cretz cretz commented Jul 6, 2022

What was changed

Tests and minor changes to support non-function callables as activities (e.g. classes with __call__)

Checklist

  1. Closes [Feature Request] Support non-function callables as activities #52

@cretz cretz requested a review from a team July 6, 2022 15:18
@cretz cretz marked this pull request as ready for review July 6, 2022 15:49
@cretz
Copy link
Member Author

cretz commented Jul 7, 2022

We have decided to revisit this to make class and method activity callables better supported. Current thoughts:

  • See if we can accept callable classes (i.e. classes with __call__) directly in execute_activity, e.g. workflow.execute_activity(MyActivityClass). Otherwise we will add execute_activity_class (and all start/local variants).
  • Due to likely ambiguity, for methods we will likely have execute_activity_method (and all start/local variants), e.g. workflow.execute_activity_method(MyClass.my_method).

I am marking this PR as draft while this is developed.

@cretz cretz marked this pull request as draft July 7, 2022 21:36
@cretz
Copy link
Member Author

cretz commented Jul 11, 2022

Closing this. There are a lot of typing changes coming to support this. Opening new PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support non-function callables as activities

1 participant