This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-04
Channels
- # announcements (5)
- # beginners (124)
- # boot (43)
- # braveandtrue (8)
- # calva (1)
- # cider (44)
- # cljs-dev (1)
- # clojure (188)
- # clojure-canada (3)
- # clojure-germany (1)
- # clojure-italy (5)
- # clojure-nl (13)
- # clojure-russia (1)
- # clojure-spec (14)
- # clojure-uk (42)
- # clojurescript (94)
- # core-async (5)
- # cursive (5)
- # datomic (45)
- # duct (3)
- # emacs (6)
- # figwheel-main (93)
- # fulcro (22)
- # graphql (3)
- # hyperfiddle (1)
- # leiningen (3)
- # off-topic (1)
- # pedestal (1)
- # play-clj (1)
- # portkey (1)
- # re-frame (17)
- # reagent (71)
- # remote-jobs (2)
- # rum (3)
- # shadow-cljs (45)
- # spacemacs (17)
- # specter (18)
- # tools-deps (27)
- # unrepl (1)
- # vim (3)
I have a lambda ion type, and one thing I’ve noticed is that my ion will continuously execute if it does not respond with a value (e.g. an error occurs, or I return nil
)
hi @U4YGF4NGM what do you mean by "continuously execute"?
I’m actually now not sure if it’s the fact that I have it connected to SQS; it might be that it’s putting it back in the queue when the lambda doesn’t return a success
I don’t see any messages in the queue as it’s happening, but that might not be accurate I guess?
I would guess that the over-and-over is an AWS retry
you might prove that by invoking it from the CLI or UI instead
... but if if in the end you think that the ion plumbing is behaving badly, let us know!
thanks for that. It’s not happening when I invoke the lambda from the UI. so I’m 97% sure it’s SQS retrying. Ion plumbing seems fine 👍
If I'd save an emoji in an entity, I get ?
on retrieving that value. It does not happen when running the database in memory, only when doing it on Postgres. Do you have a suggestion what could cause this?
How are you storing the emoji’s? (what data/type-- unicode strings?) What is the schema for the emoji? How are you querying?
Hello. Does someone know if it is possible to alias the namespace part of a namespaced keyword. In other words (or codes), from this
(ns foo.bar.baz
(:require [clojure.spec.alpha :as s]))
(s/def :company.sub-category.sub-sub-cateory/field-a keyword?)
(s/def :company.sub-category.sub-sub-cateory/field-b string?)
(s/def :company.sub-category.sub-sub-cateory/field-c integer?)
to something like this
(ns foo.bar.baz
(:require [clojure.spec.alpha :as s]))
(kwd-alias 'css 'company.sub-category.sub-sub-cateory)
(s/def ::css/field-a keyword?)
(s/def ::css/field-b string?)
(s/def ::css/field-c integer?)
or even
(ns foo.bar.baz
(:require [clojure.spec.alpha :as s]))
(with-kwd-alias ['css 'company.sub-category.sub-sub-cateory]
(s/def ::css/field-a keyword?)
(s/def ::css/field-b string?)
(s/def ::css/field-c integer?))
The regular alias
function doesn't work since the company.sub-category.sub-sub-cateory
namespace doesn't exist in the code.(ns foo.bar.baz
(:require [clojure.spec.alpha :as s]
[company.sub-category.sub-sub-cateory :as css]))
(s/def ::css/field-a keyword?)
(s/def ::css/field-b string?)
(s/def ::css/field-c integer?)
It throws
1. Unhandled java.io.FileNotFoundException
Could not locate company__init.class or company.clj on classpath.
The company.sub-category.sub-sub-category
(example here) exists in Datomic, not in my code.You can’t alias a namespace that doesn’t exist in loadable form. You can use create-ns
to fake that before you alias it though
Thanks @alexmiller
1. Is it idiomatic?
2. Do you think that with create-ns
it is possible to do it in a scoped way, like in the (with-kwd-alias ['foo 'bar] & forms)
example, or a side effect on the global environment is inevitable (I took a quick look at the source)?
Rich has some stuff in mind for managing keyword aliases - future work
you can unmap aliases with ns-unalias
, so it seems like scoping is possible. (Not sure of the caveats there.)
also none of this is possible for CLJS because it doesn't have create-ns (or real namespaces)
I am trying to connect to a datomic where both the Postgres storage and transactor are inside an AWS private network.
I am outside that network
I have ssh tunnels set up into the Bastion for port 5432, forwarding to Postgres storage
and 4334, forwarding to the transactor
I have /etc/hosts
configured to point the postgres machine name at 127.0.0.1
and point the transactor machine name at 127.0.0.1
and yet when I attempt to connect locally I see the error
`org.apache.activemq.artemis.api.core.ActiveMQSecurityException: AMQ119031: Unable to validate user
clojure.lang.ExceptionInfo: Error communicating with HOST ip-10-0-1-228.eu-central-1.compute.internal on PORT 4334
clojure.lang.Compiler$CompilerException: clojure.lang.ExceptionInfo: Error communicating with HOST ip-10-0-1-228.eu-central-1.compute.internal on PORT 4334 {:alt-host nil, :peer-version 2, :password "<<excised>>", :username "SE3P59I1dDLm/A6MH5zKpJqluSf1qOae3LrPKPVMfwc=", :port 4334, :host "ip-10-0-1-228.eu-central-1.compute.internal", :version "0.9.5561.50", :timestamp 1536071491707, :encrypt-channel true}, compiling:(NO_SOURCE_FILE:1:9)
I can connect a Socket to that address/port though
(bean (Socket. "ip-10-0-1-228.eu-central-1.compute.internal" 4334))
=>
{:closed false,
:localAddress #object[java.net.Inet4Address 0x4997a018 "/127.0.0.1"],
:remoteSocketAddress #object[java.net.InetSocketAddress
0x48aade08
"ip-10-0-1-228.eu-central-1.compute.internal/127.0.0.1:4334"],
so I am at a loss as to what else I need to do
well I have specifically cut thata out of the post
its just a randomly generated string as far as I can see
have no clue as to whether its good or bad ...
yes, postgres comms never seem to be the problem
I can watch the log on the transactor process
that contains username/passwords
I've done this kind of forwarding too (both storage and txor over ssh tunnels with etc/hosts tricks) and never had this problem; I don't know how to proceed
i can see a
Sep 04 14:40:07 transactor_i-0150df410b59045b6 datomicTransactor[1755]: {:event :transactor/remote-ips, :ips #{"10.0.2.55" "10.0.101.200" "10.0.1.115"}, :pid 1755, :tid 35}
pop up on the txtorthat's when I achieve a connection from within the private network
as the 10.0.2.55
address
oh I was running a dev transactor locally, which was already squatting on TCP port 4334
Its working now. Thanks for your help
Hi, I'm very confused about memcache. This would indicate that my memcache is not being used at all right?
i get these warnings in my datomic logs
2018-09-03 02:17:34.381 WARN default n.spy.memcached.MemcachedConnection - Could not redistribute to another node, retrying primary node for 5b8c95a3-691a-436b-a048-3f85e3546bbe.
2018-09-03 02:17:34.392 WARN default n.spy.memcached.MemcachedConnection - Could not redistribute to another node, retrying primary node for 5b8c99be-dc0a-41c1-b4f0-d273a6aa0e14.