     (while true
       (<!! (timeout timeout-online-loop))
       (let [users (online-users)]
+        (log/log-info "inserting online users requests")
         (insert-collection-requests users)
         (insert-update-metric-requests users))))
   (thread
     (while true
       (<!! (timeout timeout-all-users-loop))
       (let [users (users)]
+        (log/log-info "inserting all users requests")
         (insert-collection-requests users))
         (insert-update-metric-requests users))))
 

  (let [ch (chan 1)]
    (go
      (let [[v c] (alts! [ch (timeout timeout-collect)])]
        (when (nil? v)
          (log/log-error
            "Timeout collecting vms for user "
            (.getName user)
            " on cloud "
            (.getConnectorInstanceName connector)))))
    (go (>! ch (Collector/collect user connector)))))

(defn update-metric!

          (if (nil? user)
            (log/log-info "Metric reader " i " loop idle. Looping...")
            (try
              (log/log-info (str "executing update request for " (.getName user)))
              (update-metric! user)
              (catch Exception e (log/log-error "caught exception: " (.getMessage e))))))))))

