We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0892c5 commit 332938dCopy full SHA for 332938d
project.clj
@@ -27,5 +27,5 @@
27
:cloverage {:runner :eftest
28
:runner-opts {:multithread? false
29
:fail-fast? true}
30
- :fail-threshold 92
+ :fail-threshold 91
31
:ns-exclude-regex [#"temporal.client.worker"]})
src/temporal/core.clj
@@ -4,10 +4,15 @@
4
(:import [io.temporal.workflow Workflow]
5
[java.util.function Supplier]))
6
7
+(defn- ->supplier
8
+ [f]
9
+ (reify Supplier
10
+ (get [_]
11
+ (f))))
12
+
13
(defn await
14
"Efficiently parks the workflow until 'pred' evaluates to true. Re-evaluates on each state transition"
- [pred]
- (Workflow/await
- (reify Supplier
- (get [_]
- (pred)))))
15
+ ([pred]
16
+ (Workflow/await (->supplier pred)))
17
+ ([duration pred]
18
+ (Workflow/await duration (->supplier pred))))
0 commit comments