The slave has a bunch of attributes, one of which is the info pertaining to
its master. I initialize a vector slavesinfo but in the doseq, when I try
adding "x" using "conj", nothing happens. What am I doing wrong?
(defn slave-stats []
(let [ computer (get slave-info "computer")
slavesinfo []
]
(doseq [ x computer]
(doseq [[k v] x]
(if (and
(= k "displayName")
(not (= "master" v)))
(println "adding slaveinfo " x)
; Whats the code to add the x to slavesinfo vector
)
))
I tried the following as well...can someone enlighten me please?
(defn slave-stats [hostname port organization-id]
(let [slave-info (hudson/get-slaves hostname port organization-id)
computer (get slave-info "computer")
busyExecutors (get slave-info "totalExecutors")
display (-> computer :busyExecutors)
slavesinfo ( (fn []
(let [ myvec (vec nil)]
(println "comp is " computer)
(doseq [ x computer]
(doseq [[k v] x]
(if (and
(= k "displayName")
(not (= "master" v)))
(do
(println "info " x)
conj myvec x
(println "myvec is " myvec)
)
)
)
) myvec)
) )
]
;display (get-in computer (:displayName? :displayName))]
(println "busyExec - " busyExecutors)
(println "slavesinfo - " (count slavesinfo))
)
)
I am parsing through
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.