This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-04
Channels
- # bangalore-clj (3)
- # beginners (23)
- # boot (89)
- # cider (11)
- # cljs-dev (22)
- # cljsjs (5)
- # cljsrn (21)
- # clojure (141)
- # clojure-android (1)
- # clojure-berlin (1)
- # clojure-greece (1)
- # clojure-italy (13)
- # clojure-mke (2)
- # clojure-nl (8)
- # clojure-norway (5)
- # clojure-russia (22)
- # clojure-sg (4)
- # clojure-spec (38)
- # clojure-uk (109)
- # clojurescript (150)
- # consulting (4)
- # core-async (7)
- # cursive (13)
- # datascript (8)
- # datomic (72)
- # dirac (185)
- # emacs (5)
- # figwheel (2)
- # flambo (1)
- # hoplon (13)
- # immutant (6)
- # lambdaisland (7)
- # lumo (46)
- # off-topic (13)
- # om (4)
- # onyx (1)
- # pedestal (1)
- # re-frame (68)
- # reagent (15)
- # rum (16)
- # slack-help (4)
- # spacemacs (22)
- # specter (3)
- # vim (10)
- # yada (28)
I think I figured it out. (.addJobSelectionCriteria list JobList/SELECTION_PRIMARY_JOB_STATUS_ACTIVE, Boolean/TRUE)
(= true Boolean/TRUE)
fwiw
@fingertoe One thing to watch out for there is that .addJobSelectionCriteria
has a void
return type so it updates the list
without returning it. You might find doto
helpful here.
It returns nil when I call it from clojure. It’s supposed to change the underlying java object so when I ask it to .getJobs it gives me a specified subset.. Not sure it’s working, but you guys got me moving in the right direction. doto does look handy..
Hey good folks. Relative noob doing a little performance profiling here. Could anyone confirm that if I’m spending a lot of time in clojure.lang.RT.ClassForName
(as determined by jvisualvm profiling), I’m probably not being smart w.r.t. reflection somewhere?
@chrjs depends what's calling that function, I'd walk up the stack and see what the parents of that function call are
you can also see a lot of calls to that method if you're profiling the compiler (which you probably shouldn't)
Sagely advice, thanks @tbaldridge. I’m not profiling the compiler 😉
yeah - the time out argument to start profiling is your friend there (I’ve been doing a lot of profiling lately…), because by waiting to start the profile you can skip all the clojure.core compiling your code stuff
also, if you use leiningen, look at the output of lein check
, and see if the code it points out as using reflection shows up as hot spots in profiling - if so it could benefit from type hinting
I keep getting SQLException No suitable driver found for jdbc:mysql: when Attempting to connect to mysql.. I have a [mysql/mysql-connector-java “5.1.38”] in my project.clj I am pretty sure I am missing something obvious..
fingertoe: What does your db-spec
look like in the java.jdbc
function call?
(def mysql-db {:classname “com.mysql.jdbc.Driver” :subprotocol “mysql” :subname “http://sdb.cgibberihr.us-east-1.rds.amazonaws.com” :user “user” :password “passything”}))
I think your :subname
is the wrong format so the JDBC connection string is illegal when it is built.
I strongly recommend using the simpler and more modern form of db-spec
, with :dbtype
and :dbname
(and :host
/ :port
if needed).
Looking at your :subname
I don’t see a database name (and it doesn’t start with //
which it should).
Try something like
(def mysql-db {:dbtype "mysql" :dbname "whatever"
:user "user" :password "passything"
:host ""})
(with "whatever"
replaced by your actual database name)
I added this format because so many people get :subname
wrong…
This also takes care of the driver name since clojure.java.jdbc
knows all the common ones anyway.