Fork me on GitHub
Kira Sotnikov07:08:33

How should look the java opts for JVM for connection to ddb transactor?

Kira Sotnikov07:08:44

For PostgresSQL it looks like export DATOMIC_URI="datomic:<sql://dbname?jdbc:postgresql://>

Kira Sotnikov10:08:56

Guys, I've got infinity redirects when trying to download datomic from Amazon EC2 instance

Kira Sotnikov10:08:19

I've added --max-redirection option but it doesn't help

Kira Sotnikov10:08:45

Interesting, from laptop it works as expected

Kira Sotnikov10:08:50

It hurts me 😞


redirects all the way down


What's a fast way to rollback a test database (like "datomic:") to a blank slate, other than ((juxt d/delete-database d/create-database) uri)?


@sdegutis: I've been just opening a connection to a new url to get a blank slate


(def url "datomic:")
(def num-resets (atom 0))

(defn conn-to-fresh-db []
  (let [url (str url (swap! num-resets inc))]
    (schema/ensure-schema url)
    (d/connect url)))
^ seems like a total hack, but also seems to get the job done


@kbaribeau: I imagine that would make your memory usage skyrocket if you used an auto-test-rerunner?


it might, I was having problems with data pollution when deleting dbs though, I figured there must be a cache somewhere that's operating by URL that delete-database wouldn't clear


@kbaribeau: I've been using delete-database with no problem for 2 years, using the same in-memory uri.


@kbaribeau: So you've got something else going on there that you might want to fix.


yeah, this code has been sitting for about a year and a half without causing problems, so I'm content to let it sit


@kbaribeau: afaict that means you've got an error somewhere in your code that's hiding, from my experience it'll probably come out and bite you at some point in the future, but any way your choice just psa/fyi that's all


alright, thanks for the input I guess?


When should you not use the reader-macro form of #db/id?