Skip to content

Commit

Permalink
Update Stanford DC with new tables; Fix local mixer api root issue (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shifucun authored Mar 2, 2023
1 parent dc28ed6 commit 3c50bc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 4 additions & 1 deletion deploy/overlays/stanford/custom_bigtable_info.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
project: datcom-stanford
instance: dc-graph
tables:
- private_2022_11_09_19_28_52
- smokepm_2023_03_01_15_05_49
- aqicn_2023_03_01_19_03_31
- deepsolar_2023_03_01_14_11_18
- seda_2023_03_01_14_22_24
4 changes: 0 additions & 4 deletions server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ def create_app():
cfg = libconfig.get_config()
app.config.from_object(cfg)

# USE_LOCAL_MIXER
if cfg.LOCAL and os.environ.get('USE_LOCAL_MIXER') == 'true':
app.config['API_ROOT'] = 'http://127.0.0.1:8081'

# Init extentions
from server.cache import cache

Expand Down
4 changes: 3 additions & 1 deletion server/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os

from werkzeug.utils import import_string
Expand All @@ -25,6 +24,9 @@ def get_config():
try:
cfg = import_string(config_class)()
cfg.ENV = env
# USE_LOCAL_MIXER
if cfg.LOCAL and os.environ.get('USE_LOCAL_MIXER') == 'true':
cfg.API_ROOT = 'http://127.0.0.1:8081'
return cfg
except:
raise ValueError("No valid config class is specified: %s" % config_class)

0 comments on commit 3c50bc5

Please sign in to comment.