-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support instance-based activities #72
Comments
[Speculating] Could we use metaclass thingies to defer the call to |
I don't know "metaclass thingies" (yet), pointer? |
Sorry, no pointer found... |
Oh ok, I thought there was something special in |
No magic, just metaprogramming :-) It's easy, really. Just parse (I discovered a really marvelous implementation that this comment box's margin is too small to contain) |
@ybastide gist it ? :) |
Thanks Mr Fermat ;-) Actually I may find a smart solution with |
Arg, last problem (but not least): examples work well with ONE instance of a given task, but they'll mix up in the registry if there are two of them. We need to refine their name to include a unique ID per object. Going down the rabbit hole :( |
This has been discussed a little in #70 , but I open a separate issue for this. We'd like to be able to pass an object instance to Workflow.submit() directly to ease its instrumentation:
The recent refactoring around activity tasks could help with that.
For now I have something working here: https://github.com/botify-labs/simpleflow/tree/feature/instance-based-activities but I'm not really satisfied (one more class concept, hacky generation of an Activity, "callable" still used everywhere where in fact we have an object, no automatic args/kwargs resolution, etc.). Will try to improve that later.
The text was updated successfully, but these errors were encountered: