Comments (10)
Interesting, but sounds confusing :-); what about another method, after_step
or something?
from simpleflow.
As the original method is run
, I think before_run
and after_run
are a good choice.
Maybe we should rename current before_run
to before_first_run
and after_run
to after_last_run
?
from simpleflow.
Understood. This would be an API breakage though, so I like your first suggestion better (except it's breaking too... Inspect *_run
expected arguments in a deprecation period? Don't care?)
from simpleflow.
Let @jbbarth be the judge 😄
from simpleflow.
before_run
should be left as is: it's run on every replay for now ; we could parse the workflow execution history and try to determine if it's the first run (basically: 0 decision task taken so far), but I don't like that idea.
As for after_run
, mixed feelings. I don't like the idea of a boolean, I'd better have two different explicit hooks after_run
/ after_finished
. And yes, after_run
should be run after any replay even if the workflow raises an ExecutionBlocked (but probably not in other cases if real decision errors occur). But that would break compat' and it's a super bad habit we have. So maybe alias the old after_run
to after_finished
and introduce a new after_replay
or after_step
for now? :( or inspect args
from simpleflow.
After thinking of it 5 mins, I like the word "replay" that emphasizes the fact that the code is re-played multiple times.
Proposal:
- introduce
before_replay
,after_replay
,after_finished
- deprecate
before_run
and alias it tobefore_replay
for now - deprecate
after_run
and alias it toafter_finished
for now
What do you think?
from simpleflow.
👍
from simpleflow.
👍
from simpleflow.
Cool :) @ampelmann I let you do this?
from simpleflow.
It would be a pleasure !
from simpleflow.
Related Issues (20)
- activity_rerun fails on MetrologyTask's
- Add __main__.py module
- Add python executable information to "identity" data
- Seasonal cleanups
- workflow.filter: add start/close timestamps
- decider.start: work without workflows
- execute.python: add `env` argument
- Documentation: steps
- Canvas: misc. enhancements
- Handle dataclasses
- Simpleflow CLI not working on Mac HOT 1
- Use pyproject.toml
- Improve error handling and helpers for failed tasks
- Upgrade to boto3 HOT 6
- Circular dependencies hell HOT 3
- Write access to the repo? HOT 2
- Replace usage of "OrderedDict" by "dict"
- Remove old copyright mentions from 2013 HOT 6
- Installation from git is broken HOT 10
- boto3: Read timeouts in pollers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simpleflow.