Skip to content
Snippets Groups Projects
Commit 335654c5 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

Merge branch 'master' into segments

parents ca178e15 c1b3ee97
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@
:javac-options ["-target" "1.6" "-source" "1.6"]
:uberjar-name "metabase.jar"
:ring {:handler metabase.core/app
:init metabase.core/init
:init metabase.core/init!
:destroy metabase.core/destroy}
:eastwood {:exclude-namespaces [:test-paths]
:add-linters [:unused-private-vars]
......
databaseChangeLog:
- changeSet:
id: 23
author: agilliland
changes:
- modifyDataType:
tableName: metabase_table
columnName: rows
newDataType: BIGINT
......@@ -21,6 +21,7 @@
{"include": {"file": "migrations/020_add_pulse_tables.yaml"}},
{"include": {"file": "migrations/021_add_segment_table.yaml"}},
{"include": {"file": "migrations/022_add_revision_message_field.yaml"}},
{"include": {"file": "migrations/023_modify_table_rows_to_bigint.yaml"}},
{"include": {"file": "migrations/024_add_dependency_table.yaml"}}
]
}
......@@ -113,7 +113,7 @@
(task/stop-scheduler!)
(log/info "Metabase Shutdown COMPLETE"))
(defn init
(defn init!
"General application initialization function which should be run once at application startup."
[]
(log/info (format "Starting Metabase version %s..." (config/mb-version-string)))
......@@ -125,6 +125,7 @@
;; Load up all of our Database drivers, which are used for app db work
(driver/find-and-load-drivers!)
(reset! metabase-initialization-progress 0.4)
;; startup database. validates connection & runs any necessary migrations
(db/setup-db :auto-migrate (config/config-bool :mb-db-automigrate))
......@@ -157,9 +158,8 @@
;; otherwise update if appropriate
(sample-data/update-sample-dataset-if-needed!)))
(log/info "Metabase Initialization COMPLETE")
(initialization-complete!)
true)
(log/info "Metabase Initialization COMPLETE"))
;;; ## ---------------------------------------- Jetty (Web) Server ----------------------------------------
......@@ -209,13 +209,14 @@
;; launch embedded webserver async
(start-jetty)
;; run our initialization process
(init)
(init!)
;; Ok, now block forever while Jetty does its thing
(when (config/config-bool :mb-jetty-join)
(.join ^org.eclipse.jetty.server.Server @jetty-instance))
(catch Exception e
(.printStackTrace e)
(log/error "Metabase Initialization FAILED: " (.getMessage e)))))
(log/error "Metabase Initialization FAILED: " (.getMessage e))
(System/exit 1))))
(defn- run-cmd [cmd & args]
(let [cmd->fn {:migrate (fn [direction]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment