Problem with watch-changes

13 views
Skip to first unread message

rfhayashi

unread,
Aug 7, 2011, 9:53:52 AM8/7/11
to Clojure Clutch
I'm playing with clutch and couchdb as I read about both of them in
Clojure Programming by Chas Emerick et al. I'm trying to run the
example of the _changes API using clutch/watch-changes. It just don't
work and I can't figure out a way to debug what's going on. I'm using
a cloudant (cloudant.com) account.

My database meta looks like this:

(def mymeta {:host "myaccount.cloudant.com" :username
"username" :password "password"})

I'm calling watch-changes like this:

(clutch/watch-changes mymeta :echo (partial println "change:"))

It returns successfully. However, I create new documents, but nothing
is printed.

Could that be related to using cloudant? Any suggestions on how to
debug it?

Tks

Rui

Russell Branca

unread,
Aug 15, 2011, 1:43:30 AM8/15/11
to clojure...@googlegroups.com
Hi all,

I'm running into the same issue. Any ideas?


-Russell

Russell Branca

unread,
Aug 15, 2011, 2:14:02 AM8/15/11
to clojure...@googlegroups.com
The issue on my end was running this in vim-clojure. Works fine in lein repl, but not inside of a vim repl.


-Russell

rfhayashi

unread,
Aug 15, 2011, 8:09:43 AM8/15/11
to Clojure Clutch
Hi Russell

I'm running in a lein repl. Do you have any idea why it doesn't run in
vim-clojure? It might be not about vim-clojure x lein, but something
lacking in your vim-clojure and my lein.

Tks

Rui

Russell Branca

unread,
Aug 15, 2011, 7:48:05 PM8/15/11
to clojure...@googlegroups.com
Hi Rui,

I've run into weird issues with vim-clojure like this before which is why I thought to check it in a standard clojure repl. Once I was in a standard repl, this worked fine:

(clutch/watch-changes "somedb" :foo (partial println "New change: "))


-Russell
Reply all
Reply to author
Forward
0 new messages