Skip to content

Commit

Permalink
Adjusts pull.simple components to act like polling components
Browse files Browse the repository at this point in the history
But we cannot convert them because we can floats for the interval
and the polling component does not support that. So we try to mimic
the beehaviour.

* Allows floats for parse_duration_literal
* Adds interval argument for components
* Adds duration literal parsing of interval/wait argument
  • Loading branch information
HazardDede committed Nov 12, 2019
1 parent 76200d3 commit 0630204
Show file tree
Hide file tree
Showing 63 changed files with 223 additions and 128 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ It is up to you. I prefer yaml...
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down Expand Up @@ -245,7 +245,7 @@ Given the example ...
pull:
plugin: pnp.plugins.pull.simple.Count
args:
wait: 1
interval: 1s
push:
plugin: pnp.plugins.push.fs.FileDump
selector:
Expand Down Expand Up @@ -309,7 +309,7 @@ you can perform for each loops for pushes.
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat:
- 1
- 2
Expand All @@ -329,7 +329,7 @@ If you need the selector to augment your list, use a `push.simple.Nop` with `unw
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat:
- 1
- 2
Expand Down Expand Up @@ -534,7 +534,7 @@ Additional example:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down Expand Up @@ -581,7 +581,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down
2 changes: 1 addition & 1 deletion config/01_hello_world.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
2 changes: 1 addition & 1 deletion config/02_multipush.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down
2 changes: 1 addition & 1 deletion config/03_lambda_selector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down
2 changes: 1 addition & 1 deletion config/03_selector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down
2 changes: 1 addition & 1 deletion config/04_suppress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
pull:
plugin: pnp.plugins.pull.simple.Count
args:
wait: 1
interval: 1s
push:
- plugin: pnp.plugins.push.simple.Echo
# variable suppress is basically a constant that tells the push not to execute
Expand Down
2 changes: 1 addition & 1 deletion config/05_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Nop
Expand Down
2 changes: 1 addition & 1 deletion config/06_complex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Nop
Expand Down
2 changes: 1 addition & 1 deletion config/07_reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- <<: *echo_plugin
Expand Down
2 changes: 1 addition & 1 deletion config/08_envelope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pull:
plugin: pnp.plugins.pull.simple.Count
args:
wait: 1
interval: 1s
push:
plugin: pnp.plugins.push.fs.FileDump
selector:
Expand Down
2 changes: 1 addition & 1 deletion config/engines/process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
2 changes: 1 addition & 1 deletion config/engines/sequential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Count
args:
wait: 1
interval: 1s
from_cnt: 1
to_cnt: 4
push:
Expand Down
2 changes: 1 addition & 1 deletion config/engines/threading.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
2 changes: 1 addition & 1 deletion config/readme/01_hello_world.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
2 changes: 1 addition & 1 deletion config/readme/05_envelope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pull:
plugin: pnp.plugins.pull.simple.Count
args:
wait: 1
interval: 1s
push:
plugin: pnp.plugins.push.fs.FileDump
selector:
Expand Down
2 changes: 1 addition & 1 deletion config/readme/06_unwrapping.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat:
- 1
- 2
Expand Down
2 changes: 1 addition & 1 deletion config/readme/07_unwrapping_nop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat:
- 1
- 2
Expand Down
2 changes: 1 addition & 1 deletion config/readme/08_udf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down
2 changes: 1 addition & 1 deletion config/readme/09_udf_throttle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down
8 changes: 4 additions & 4 deletions docs/engines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Count
args:
wait: 1
interval: 1s
from_cnt: 1
to_cnt: 4
push:
Expand All @@ -62,7 +62,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand All @@ -86,7 +86,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand All @@ -109,7 +109,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Expand Down
2 changes: 1 addition & 1 deletion docs/engines/async.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
2 changes: 1 addition & 1 deletion docs/engines/process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
2 changes: 1 addition & 1 deletion docs/engines/sequential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Count
args:
wait: 1
interval: 1s
from_cnt: 1
to_cnt: 4
push:
Expand Down
2 changes: 1 addition & 1 deletion docs/engines/threading.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tasks:
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
wait: 1
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
Loading

0 comments on commit 0630204

Please sign in to comment.