Skip to content

Commit

Permalink
figure out where its running
Browse files Browse the repository at this point in the history
  • Loading branch information
salsakran committed Nov 25, 2016
1 parent 9dd6813 commit 7093fa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OSX/Metabase/Backend/MetabaseTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ - (void)launch {
self.task.launchPath = JREPath();
self.task.environment = @{@"MB_DB_FILE": DBPath(),
@"MB_PLUGINS_DIR": PluginsDirPath(),
@"MB_JETTY_PORT": @(self.port)};
@"MB_JETTY_PORT": @(self.port),
@"MB_CLIENT": @"OSX"};
self.task.arguments = @[@"-Djava.awt.headless=true", // this prevents the extra java icon from popping up in the dock when running
@"-client", // make sure we're running in -client mode, which has a faster lanuch time
@"-Xverify:none", // disable bytecode verification for faster launch speed, not really needed here since JAR is packaged as part of signed .app
Expand Down
5 changes: 5 additions & 0 deletions src/metabase/util/stats.clj
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@
(defn- where-am-i-running?
"Figure out what we're running under"
[]
(cond
(not (nil? (environ :database-url))) :heroku
(not (nil? (environ :rds-hostname))) :elastic-beanstalk
(not (= (environ :mb-client) :osx)) :osx
:default "unknown")

)
(defn- get-settings
Expand Down

0 comments on commit 7093fa5

Please sign in to comment.