 (def jetty (atom nil))
 
 (defn setup 
-  "one time setup" 
+  "One time setup" 
   []
   (initialize-networking)
   (setup-logging)

      :ssl-port (get! :celestial :https-port)}))

(defn start 
  "main componenets startup (jetty, job workers etc..)"
  [jetty]
  (jobs/initialize-workers)
  (info (slurp (resource "main/resources/celestial.txt")))

    (set-config! [:appenders :spit :enabled?] true) 
    (set-level! (log* :level))))

(defn clean-up 
  "Clean/release resources, used also as a shutdown hook"
  []
  (debug "Shutting down...")
  (jobs/clean-shutdown)
  (clear-locks)
  (es/stop))

(defn add-shutdown []
  (.addShutdownHook (Runtime/getRuntime) (Thread. clean-up)))
