       ;;call other function
       )
     (log/info "check for metabadges: done")
-    (badge->metabadge! ctx factory-url)
+    (badge->metabadge! ctx db-conn factory-url)
     ))
 
 (defn every-hour [ctx]

          (try (Thread/sleep 1000) (catch InterruptedException _))
          ))
      (log/info "get metabadges: done")
      )))

(defn- check-metabadges [ctx factory-url]
  (log/info "check for metabadges: started working")

        (when (> time-limit (System/currentTimeMillis))
          (doseq [user-badge chunk]
            (try
              (db/get-metabadge! ctx db-conn factory-url user-badge)
              (catch Throwable ex
                (log/error "get-metabadges failed")
                (log/error (.toString ex))
