You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/08/04 15:51:42 UTC
[incubator-superset] branch master updated: SUPERSET_HOME
enviroment variable (#3238)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 0191fa5 SUPERSET_HOME enviroment variable (#3238)
0191fa5 is described below
commit 0191fa58c87c878147ce3e6d4645c587dcd268e8
Author: Rich @ RadICS <ri...@radics.co.uk>
AuthorDate: Fri Aug 4 17:51:40 2017 +0200
SUPERSET_HOME enviroment variable (#3238)
* Change hardcoded references to 'User' security model to allow custom class override
* Add SUPERSET_HOME environment variable
---
docs/faq.rst | 6 +++---
superset/config.py | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/docs/faq.rst b/docs/faq.rst
index 3fc8cef..12a0198 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -145,13 +145,13 @@ In the example above, if a timed refresh is set for the dashboard, then every sl
Why does fabmanager or superset freezed/hung/not responding when started (my home directory is NFS mounted)?
-----------------------------------------------------------------------------------------
-superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.
+By default, superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.
__ https://www.sqlite.org/lockingv3.html
-One work around is to create a symlink from ~/.superset to a directory located on a non-NFS partition.
+You can override this path using the ``SUPERSET_HOME`` environment variable.
-Another work around is to change where superset stores the sqlite database by adding ``SQLALCHEMY_DATABASE_URI = 'sqlite:////new/localtion/superset.db'`` in superset_config.py (create the file if needed), then adding the directory where superset_config.py lives to PYTHONPATH environment variable (e.g. ``export PYTHONPATH=/opt/logs/sandbox/airbnb/``).
+Another work around is to change where superset stores the sqlite database by adding ``SQLALCHEMY_DATABASE_URI = 'sqlite:////new/location/superset.db'`` in superset_config.py (create the file if needed), then adding the directory where superset_config.py lives to PYTHONPATH environment variable (e.g. ``export PYTHONPATH=/opt/logs/sandbox/airbnb/``).
How do I add new columns to an existing table
---------------------------------------------
diff --git a/superset/config.py b/superset/config.py
index 47126f8..bc91edd 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -24,7 +24,10 @@ from superset.stats_logger import DummyStatsLogger
STATS_LOGGER = DummyStatsLogger()
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
-DATA_DIR = os.path.join(os.path.expanduser('~'), '.superset')
+if 'SUPERSET_HOME' in os.environ:
+ DATA_DIR = os.environ['SUPERSET_HOME']
+else:
+ DATA_DIR = os.path.join(os.path.expanduser('~'), '.superset')
if not os.path.exists(DATA_DIR):
os.makedirs(DATA_DIR)
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].