add live_users key
parent
f142b3fd0c
commit
b74155de3e
|
@ -46,13 +46,16 @@
|
||||||
(filter (fn [f] (and (not (= f "ubuntu")) (not (= f "poetry")))))))
|
(filter (fn [f] (and (not (= f "ubuntu")) (not (= f "poetry")))))))
|
||||||
|
|
||||||
(if (= __name__ "__main__")
|
(if (= __name__ "__main__")
|
||||||
(let [[users (->> (user-generator)
|
(let [[all_users (->> (user-generator)
|
||||||
sort-user-list
|
sort-user-list
|
||||||
reversed
|
reversed
|
||||||
(map (fn [un] {"username" un
|
(map (fn [un] {"username" un
|
||||||
"default" (default? un)}))
|
"default" (default? un)}))
|
||||||
list)]
|
list)
|
||||||
[data {"users" users
|
[live_users (-> (filter (fn [u] (not (get u "default"))) all_users)
|
||||||
|
list)]]
|
||||||
|
[data {"all_users" users
|
||||||
|
"live_users" live_users
|
||||||
"active_user_count" (-> (. (facter "active_user_count") stdout)
|
"active_user_count" (-> (. (facter "active_user_count") stdout)
|
||||||
.strip
|
.strip
|
||||||
int)
|
int)
|
||||||
|
|
Reference in New Issue