This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-14
Channels
- # announcements (10)
- # babashka (14)
- # beginners (51)
- # calva (2)
- # cider (28)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (185)
- # clojure-dev (15)
- # clojure-europe (6)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-uk (45)
- # clojurescript (4)
- # conjure (12)
- # datomic (37)
- # duct (37)
- # figwheel-main (15)
- # helix (23)
- # interceptors (1)
- # jobs (1)
- # jobs-discuss (11)
- # jvm (5)
- # luminus (3)
- # malli (15)
- # off-topic (69)
- # pathom (8)
- # pedestal (2)
- # re-frame (7)
- # reagent (58)
- # reitit (33)
- # remote-jobs (1)
- # rum (14)
- # sci (7)
- # shadow-cljs (15)
- # spacemacs (9)
- # testing (19)
- # timbre (3)
- # tools-deps (14)
Did datomic cloud lose the collection find spec that was in on-prem? :find [?release-name ...]
https://docs.datomic.com/on-prem/query.html#find-specifications https://docs.datomic.com/cloud/query/query-data-reference.html#find-specs. I haven't found cloud docs on it and it doesn't look like it's working when I've tried it in the REPL.
If datomic cloud doesn't have the collection find spec, what is the recommended way to return a collection instead? Massage it on the programming language level?
what's the preferred method of daemonizing the transactor on a linux server?
Just the general unix advice? Don’t daemonize: manage the process with an init system like systemd
got it. yep that's exactly the advice I was looking for. Also I thought systemd was a daemonization process?? Maybe I'm just confused on terminology. I meant "robust way to run the thing in the background better than a screen session"
are you just running a one-off transactor in a terminal? screen, new terminal tab, or even bash job-control is fine
by “don’t daemonize” I mean don’t do the double fork/join “daemon” mode of older style inits
We uploaded dev-local to a private s3 repo and bring it in with tools-deps s3 support. I think lein has a s3 wagon to do the same.
Hi, most probably someone already asked if in some point in the future Datomic Cloud will allow queries across databases. It’d be very nice to have in certain cases when working with sharded databases.
There was a limitation, but seems to be solved now, can you confirm it @U083D6HK9?
@U083D6HK9 I read in the current #datomic channel and here also: https://forum.datomic.com/t/filtering-and-multi-database-queries/481 that cross join is not allowed when one is using Datomic Cloud.
(Just following this conversation in case there has been an update, as we’ve been handling joins in client code)
Great @U4Z2TFMJ9, I’m reading the Datomic Cloud documentation and seems to be the case. Sometimes is a little bit painful to revisit all docs to know if something changed. Maybe the Release Notes is the best place to be aware of all changes.
Yeah, thanks @U28A9C90Q. I think @U083D6HK9 rightly pointed out that query can take in multiple dbs, however it appears in cloud those dbs must be the same.
(d/q {:query '[:find (count ?a)
:in $1
:where
[$1 _ :db/ident ?a]]
:args [db-1]})
=> [[661]]
(d/q {:query '[:find (count ?a)
:in $2
:where
[$2 _ :db/ident ?a]]
:args [db-2]})
=> [[68]]
(d/q {:query '[:find (count ?a)
:in $1 $2
:where
[$1 _ :db/ident ?a]
[$2 _ :db/ident ?a]]
:args [db-1 db-2]})
Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
Query db arg does not match connection
I’ve always based the fact that it’s unsupported off this: https://docs.datomic.com/on-prem/clients-and-peers.htmlExactly @U35LPCHNH
> Sometimes is a little bit painful to revisit all docs @U28A9C90Q They post releases to https://forum.datomic.com/c/datomic-gen/announcements/6. You can follow it for updates.
Hi there, I was wondering what tools are mostly used when monitoring datomic cloud, I mean are there any other options other than cloud watch?
I am trying to write basic ping functionality with a websocket ion, but it is failing with the error:
no protocol: <api-id>.>: datomic.ion.lambda.handler.exceptions.Incorrect
clojure.lang.ExceptionInfo: no protocol: <api-id>.> {:cognitect.anomalies/category :cognitect.anomalies/incorrect, :cognitect.anomalies/message "no protocol: <api-id>.
at datomic.ion.lambda.handler$throw_anomaly.invokeStatic(handler.clj:24)
at datomic.ion.lambda.handler$throw_anomaly.invoke(handler.clj:20)
at datomic.ion.lambda.handler.Handler.on_anomaly(handler.clj:171)
at datomic.ion.lambda.handler.Handler.handle_request(handler.clj:196)
at datomic.ion.lambda.handler$fn__3841$G__3766__3846.invoke(handler.clj:67)
at datomic.ion.lambda.handler$fn__3841$G__3765__3852.invoke(handler.clj:67)
at clojure.lang.Var.invoke(Var.java:399)
at datomic.ion.lambda.handler.Thunk.handleRequest(Thunk.java:35)
I am using the following code
clj
(defn messages-lambda [{:keys [input context]}]
(let [input (-> input
(json/parse-string true)
(update-in [:body] json/parse-string true))
{:as response :keys [::recipients]} (action input)
response (-> response
(dissoc ::recipients)
)]
(doseq [id recipients]
(try
(cast/event {:msg "messages-lambda"
:response (str response)
:url (send-url input id)})
(client/post (send-url input id) {:form-params {:action "pong"}, :content-type :json})
(catch clojure.lang.ExceptionInfo e
(let [{:keys [status reason-phrase]} (ex-data e)]
(cast/event {:msg "messages-lambda" :status status :reason reason-phrase})
(far/delete-item nil sockets-table {:connection-id id}))))
(json/generate-string {:statusCode 200}))))
I get the event msg
{"Msg": "messages-lambda",
"Response": "{:action :pong}",
"Url": "<api-id>.>",
"Type": "Event",
"Tid": 65,
"Timestamp": 1594749027640}