This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-02
Channels
- # boot (227)
- # carry (1)
- # cljs-dev (3)
- # cljsjs (2)
- # cljsrn (19)
- # clojars (2)
- # clojure (93)
- # clojure-belgium (1)
- # clojure-dev (2)
- # clojure-italy (1)
- # clojure-spec (22)
- # clojure-uk (5)
- # core-async (15)
- # cursive (33)
- # emacs (8)
- # ethereum (1)
- # hoplon (3)
- # jobs (2)
- # leiningen (1)
- # off-topic (24)
- # om (32)
- # perun (1)
- # protorepl (1)
- # re-frame (13)
- # reagent (53)
- # rethinkdb (4)
- # ring-swagger (1)
- # vim (12)
- # yada (14)
Hello! I’m fairly new to core.async and I’m hoping to improve some of my code! I’ve uploaded some code that I’m currently using to create somewhat reusable pipelines for a series of variables that I need to scrape off some public websites. If anyone could look at the code and suggest improvements I’d greatly appreciate it! (https://gist.github.com/adairdavid/84932f9e77eb1f62b63ed606b898a214). Specifically, I’m looking to remove some of the duplicated boilerplate for each scraping process. In the gist, some duplicated boilerplate would be the launch
function. I feel like my code currently creates an unnecessary amount of channels, and I’d like to streamline that so that these processes are more easily started/stopped when integrated into the Component
Lifecycle. Thanks!
persist is pipeline-blocking
with a curried or partial function that closes over the db connection in the transducer
In terms of reducing the number of channels a) there’s no way around that and b) it’s ok channels are cheap
One thing I tend to do is wrap the pipeline*
functions to change their signatures so that they take an input channel but create/return the output one, this way the channels can be threaded with ->