Some structural work
This commit is contained in:
parent
5562d451ce
commit
c9a2afc79b
4 changed files with 9 additions and 10 deletions
|
@ -18,7 +18,8 @@
|
|||
[enlive "1.1.1"]
|
||||
[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
|
||||
:init ldview.handler/init
|
||||
:destroy ldview.handler/destroy}
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
[:shared-appender-config :rotor]
|
||||
{: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"))
|
||||
|
||||
(defn destroy
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
(serve (get-handler)
|
||||
{:port port
|
||||
:init init
|
||||
:auto-reload? true
|
||||
:destroy destroy
|
||||
:join? true}))
|
||||
(println (str "You can view the site at http://localhost:" port))))
|
||||
:auto-reload? true
|
||||
:open-browser? false
|
||||
:join? false}))))
|
||||
|
||||
(defn stop-server []
|
||||
(.stop @server)
|
||||
|
|
|
@ -32,11 +32,10 @@
|
|||
(if-not (entry/exists? 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)
|
||||
(schema/create-tables)
|
||||
(competition/create! 27 "10 Seconds")) ; FIXME: Make it dynamic
|
||||
|
||||
(defn start []
|
||||
(competition/create! id title)
|
||||
(fetch-all-content))
|
||||
|
||||
|
|
Loading…
Reference in a new issue