This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-28
Channels
- # announcements (9)
- # aws (2)
- # beginners (45)
- # biff (2)
- # calva (20)
- # cider (4)
- # cljdoc (15)
- # cljs-dev (9)
- # clojure (102)
- # clojure-austin (14)
- # clojure-europe (39)
- # clojure-france (3)
- # clojure-germany (1)
- # clojure-norway (39)
- # clojure-spec (1)
- # clojure-uk (3)
- # conjure (8)
- # cursive (6)
- # datahike (3)
- # datomic (8)
- # emacs (28)
- # events (1)
- # holy-lambda (6)
- # hyperfiddle (13)
- # jobs (11)
- # keechma (2)
- # lsp (4)
- # malli (33)
- # nbb (36)
- # off-topic (52)
- # pathom (5)
- # pedestal (2)
- # portal (1)
- # reagent (2)
- # reitit (3)
- # remote-jobs (1)
- # scittle (1)
- # spacemacs (2)
- # xtdb (5)
seems this example from the pathom 3 docs does not work:
(def parallel-env
(-> {::p.a.eql/parallel? true}
(pci/register
[random-dog-image
random-cat-image
random-pets])))
...or perhaps that's just me not getting it to work. How should I enable parallel execution assuming the above is not the way?hard to infer just from this, can you show the complete example?
so far looks correct, but you also need to make sure to use the async runner, and remember that the async runner returns a promise (that will resolve to the final value)
I think I had a problem with the namespace qualified keywords and the fact that almost none of the code snippets at
don't show the (:require [ ... :as ...])
. I finally found your namespace alias list at the start of the documentation set so I think that just solved my problem : )
@U066U8JQJ ok so now I have something I think perhaps should be working but the requests do not seem to be executed in parallel. Should this be enough to enable parallel execution:
(def env (-> {::p.a.eql/parallel? true}
(pci/register (concat swapi/resolvers
imdb/resolvers
[swapi->imdb imdb->swapi]))))
(comment
(time
; deeply nested query combining swapi and imdb
@(p.a.eql/process env
{:swapi.person/id 1}
[:swapi.person/name
{:swapi.person/homeworld [:swapi.planet/name
{:swapi.planet/residents [:swapi.person/name]}]}
{:swapi.person/films [:swapi.movie/title
{:imdb.movie/actor-list [:imdb.person/name
:imdb.person/id
:imdb.person/as-character
{:imdb.person/known-for [:imdb.movie/title :imdb.movie/year]}
]}]}]))
)
?
I have some logging in my request function and I can see they are all being executed in sequence