 (defn- scheduler-stats [] (dq/stats q))
 
 
-(defn run-index-sample [db]
+(defn schedule-jobs-sample [db]
   ;; schedule something for testing
   (let [eids (get-eids-by-type db :analysis/id)
         jobs (make-batches 1000 :analysis eids)]

                    (recur)))
                (close! logger)))))

        (run-index-all db)
        ;;(run-index-sample db)
        (prn (scheduler-stats))

        )

      (if-not skip-create-snapshot
        (let [repository-name "s3_repository"]
          (do
            (connect-snapshot-repository repository-name)
            (let [snapshot-id (get-next-snapshot-id repository-name release-id)]
              (save-snapshot index-id repository-name snapshot-id)))))
      )))


(defn -main
  "I don't do a whole lot ... yet."
  [& args]
  (do
    (es-connect)
    (println "Indexer starting!")
    (mount/start)
    (if-let [index-revision-number (first args)]
      (run :index-revision-number index-revision-number)
      (run))
    (mount/stop))
  )

      (scheduler-put! job)))
  )

(defn schedule-jobs-all [db]
  (do
    ;; add jobs to scheduler in sequence

