This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-21
Channels
- # announcements (3)
- # aws (8)
- # babashka (14)
- # beginners (39)
- # biff (22)
- # cider (5)
- # clj-kondo (1)
- # cljs-dev (12)
- # cljsjs (4)
- # clojure (16)
- # clojure-europe (47)
- # clojure-germany (6)
- # clojure-uk (2)
- # clojurescript (36)
- # core-async (29)
- # cursive (19)
- # datalevin (14)
- # etaoin (10)
- # helix (1)
- # hyperfiddle (6)
- # introduce-yourself (5)
- # kaocha (43)
- # keechma (1)
- # lsp (7)
- # nbb (68)
- # new-channels (1)
- # off-topic (12)
- # pathom (11)
- # quil (14)
- # rdf (3)
- # re-frame (5)
- # reitit (6)
- # shadow-cljs (88)
how do you use a waiter with https://github.com/cognitect-labs/aws-api? I.e. Iām starting a cluster and I want to block the thread until it is done starting?
I don't think this is fully intended to be used like this, but you can use the async version of the api's invoke
along with :retriable
to check if your thing is ready
(a/<!!
(aaws/invoke cfn
{:op <describe resources>
:request <request for resource info>
:retriable? (fn [result] <truthy when resource is ready>)
:backoff (fn [x]
(println "retry" (str "#" x))
(cond
(zero? x) 60000
(< x 20) 10000))}))
š 1
yep that looks quite useful, I was just wondering what is the recommended way
Here's a bit more info why I don't think the :retriable thing is offically supported (I could be wrong) https://clojurians.slack.com/archives/C09N0H1RB/p1652101946639159
š 1