Some structural work

This commit is contained in:
Aaron Mueller 2014-01-18 00:01:50 +01:00
parent 5562d451ce
commit c9a2afc79b
4 changed files with 9 additions and 10 deletions

View file

@ -18,7 +18,8 @@
[enlive "1.1.1"] [enlive "1.1.1"]
[me.raynes/fs "1.4.5"]] [me.raynes/fs "1.4.5"]]
:plugins [[lein-ring "0.8.7"]] :plugins [[lein-ring "0.8.7"]
[lein-autoreload "0.1.0"]]
:ring {:handler ldview.handler/war-handler :ring {:handler ldview.handler/war-handler
:init ldview.handler/init :init ldview.handler/init
:destroy ldview.handler/destroy} :destroy ldview.handler/destroy}

View file

@ -30,8 +30,7 @@
[:shared-appender-config :rotor] [:shared-appender-config :rotor]
{:path "ldview.log" :max-size (* 512 1024) :backlog 10}) {:path "ldview.log" :max-size (* 512 1024) :backlog 10})
;(if-not (schema/initialized?) (schema/create-tables)) (if-not (schema/initialized?) (schema/create-tables))
(timbre/info "ldview started successfully")) (timbre/info "ldview started successfully"))
(defn destroy (defn destroy

View file

@ -24,10 +24,10 @@
(serve (get-handler) (serve (get-handler)
{:port port {:port port
:init init :init init
:auto-reload? true
:destroy destroy :destroy destroy
:join? true})) :auto-reload? true
(println (str "You can view the site at http://localhost:" port)))) :open-browser? false
:join? false}))))
(defn stop-server [] (defn stop-server []
(.stop @server) (.stop @server)

View file

@ -32,11 +32,10 @@
(if-not (entry/exists? ld-uid) (if-not (entry/exists? ld-uid)
(save-entry (scrape/entry-details ld-uid))))))) (save-entry (scrape/entry-details ld-uid)))))))
(defn prepare [] ; TODO: Whatch out, the competition is set in the scrape .... refactor this ...
(defn load-competition [id title]
(cleanup) (cleanup)
(schema/create-tables) (schema/create-tables)
(competition/create! 27 "10 Seconds")) ; FIXME: Make it dynamic (competition/create! id title)
(defn start []
(fetch-all-content)) (fetch-all-content))