 (def state (atom {}))
 
 (defn init [args]
+  (swap! state assoc :interval (Integer/parseInt (first args)))
   (swap! state assoc :running true))
 
 (defn start []


;; Enable command-line invocation
(defn -main [& args]
  (println args)
  (init args)
  (start))


      (cassandra2elasticsearch esconn casconn)
      (println "elasticsearch2cassandra")
      (elasticsearch2cassandra esconn casconn)
      (Thread/sleep (:interval @state)))))

(defn stop []
  (swap! state assoc :running false))
