 
 (defn set-people-to-all-active-klicksters [atm interval]
   (go-loop []
-    (reset! atm (<! (genome/<get-all-active-klickster-profiles)))
-    (println "Downloaded" (count @atm) "Klicksters") 
+    (let [people (<! (genome/<get-all-active-klickster-profiles))]
+      (when (> (count people) 0)
+        (do
+          (reset! atm people)
+          (println "Downloaded" (count @atm) "Klicksters")))) 
     (<! (timeout interval))
     (recur)))
 
 (set-people-to-all-active-klicksters people-atom (* 5 60 1000))
+
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; filter macro test


(defn Floor [title users]
  [:div 
   [:h3 title]
   [:hr]
   [:div {:style {:display :flex
                  :flex-direction :row

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; State

(defonce people-atom (local-storage (atom []) :people))
(defonce filters (local-storage (atom ["(startsWith? :KeyscanStatus \"In\")"]) :filters))

(def all-profile-keys '(:IsObjectivesAdmin :LaborCategoryID :FirstName :LaborRoleID :OversightPercent :WorkTeamID :BusinessUnitName :MobileNumber :PhotoFileName :IsCandidateAdmin :CanCommunicateClient :UserSystemID :Email :CreatedDate :BillingTargetHoursPerYear :Title :MobileNumberCountryCode :IsClient :IsScheduleConfirmationRulesEnforced :LastName :IsScheduleAdmin :UserName :Extension :TimeZoneName :HomeNumber :IsNotAPerson :UserID :KeyscanUpdated :HasDirectReports :IsAdmin :BusinessUnitID :CountryID :CompanyBusinessUnitID :TimeZoneID :PhotoPath :Name :Roles :CompanyBusinessUnitName :IsWeeklyReviewAdmin :Enabled :TagName :Supervisors :KeyscanStatus :OutOfOfficeReason :Status))
; (take! (genome/<get-all-active-klickster-profiles) (fn [profiles] (->> (apply merge profiles ) keys prn)))
