-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from radiantone/0.1.14
0.1.14
- Loading branch information
Showing
6 changed files
with
288 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Hello, | ||
Thank you for checking out my package. This file will contain current areas of needed development help and other useful | ||
things for those wanting to help develop entangle. | ||
|
||
Current Needs | ||
------------- | ||
|
||
1. Retry logic (underway) | ||
2. Better error handling and reporting for ssh tasks | ||
3. Dataflow decorator does not currently work with ssh, thus disributed dataflows are broken until this is fixed. | ||
ssh scheduler example works fine with workflows though. | ||
4. Support for various @aws decorators | ||
5. Support for database decorators e.g. @mysql, @mongo etc | ||
6. Batch Support with workflow and dataflows | ||
7. Domain specific decorators for working with 3rd party libraries | ||
|
||
Thanks! | ||
Darren |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# pylint: disable=locally-disabled, multiple-statements, no-value-for-parameter, invalid-name, too-many-function-args, unused-import, missing-function-docstring | ||
""" | ||
TBD | ||
""" | ||
from entangle.logging.file import logging | ||
from entangle.process import process | ||
|
||
|
||
@process | ||
def one(): | ||
return 1 | ||
|
||
|
||
@process | ||
def two(): | ||
return 2 | ||
|
||
|
||
@process(retry=5) | ||
def five(): | ||
import time | ||
val = int(str(time.time()).split('.')[1]) % 5 | ||
if val != 0: | ||
raise Exception("Not a FIVE!") | ||
return 5 | ||
|
||
|
||
@process | ||
def num(n): | ||
return n | ||
|
||
|
||
@process | ||
def add(a, b): | ||
print(a,b) | ||
v = int(a) + int(b) | ||
print("ADD: *"+str(v)+"*") | ||
return v | ||
|
||
|
||
@process | ||
def subtract(a, b): | ||
return int(a) - int(b) | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
""" | ||
_five = five() | ||
_two = two() | ||
_sub = subtract(_five,_two) | ||
_num = num(6) | ||
_two2 = two() if False else one() | ||
_add1 = add(_num,_two2) | ||
result = add(_add1,_sub) | ||
""" | ||
workflow = add( | ||
add( | ||
num(6), | ||
two() if False else one() | ||
), | ||
subtract( | ||
five(), | ||
add( | ||
subtract( | ||
num(8), | ||
two() | ||
), | ||
one() | ||
) | ||
) | ||
) | ||
result = workflow() | ||
print(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.