Comments (5)
@kstrauser: I have a different view to present here. I don't think it should fail. The reason I think so is one of the jobs might be a cleanup job which is quite needed in a lot of places. If the failure of a stage compels the next stage to fail, we may end up in a situation where the cleanup jobs are not executed.
Having said that I believe we should have control over dependency and choice. So, I have been thinking of Job
having an optional parameter called gate
. This gate is a callable of some sort which returns a boolean which would decide whether the job needs to be executed or not.
j1 = Job(job1)
# Lets assume job1 pushes its state into a queue or some variable x.
def gate_method():
flag = True
# flag value is set to variable x or popped value from queue
return flag
j2 = Job(job2, gate=gate_method)
When job 2 is being run it will check for value returned by gate_method and only if it is true will execute job2.
That will introduce the notion of dynamic decision in pipeline. What do you think?
from pypette.
That’s a really good point about cleanup jobs! I think the gate
idea sounds wonderful, though. What if there was also a function like last_job_succeeded()
that returns true if and only if the previous job completed without raising an exception. Perhaps that could even be the default value, like gate=last_job_succeeded
, so that by default a failure stop execution but that it would be trivially easy to turn it off for cleanup jobs?
from pypette.
@kstrauser : Have added a bunch of new stuff including exception handling modes and dependency. Look at examples/
for the usage. Still testing a couple of things after which will release officially. Give it a whirl and let me know.
from pypette.
v0.0.9 should resolve this issue.
from pypette.
I'll take a look. Thanks for following up!
from pypette.
Related Issues (5)
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 pypette.