Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 8c8613a

Browse files
Merge branch 'production' into api_restful
2 parents d668cb8 + 2c3b0af commit 8c8613a

File tree

86 files changed

+135
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+135
-27
lines changed

examples/lambda_api/boot.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def load_env(env='dev', force=False):
138138

139139
logger = get_internal_logger()
140140

141-
global _LOADED, _ENV_KEYS
141+
global _LOADED, _ENV_KEYS, _DEFAULT_ENV_CONFIGS
142142
if not _LOADED or force:
143143

144144
logger.info('Boot - Loading env: {}'.format(env))
@@ -166,10 +166,14 @@ def load_env(env='dev', force=False):
166166

167167
if env in configs['stages']:
168168
env_vars = configs['stages'][env]['environment_variables']
169-
for k, v in env_vars.items():
170-
_ENV_KEYS.append(k)
171-
os.environ[k] = v
172-
_LOADED = True
169+
if isinstance(env_vars, dict):
170+
for k, v in env_vars.items():
171+
_ENV_KEYS.append(k)
172+
if k not in os.environ:
173+
os.environ[k] = v
174+
_LOADED = True
175+
else:
176+
logger.error("Unable to load env_vars from chalice: {}".format(env_vars))
173177
else:
174178
# solution for projects with development flag instead of dev
175179
if env == 'dev':

examples/lambda_api/public/swagger/openapi.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,5 @@ paths:
255255
$ref: '#/components/schemas/EventCreateErrorResponse'
256256
summary: Create event
257257
servers:
258-
- description: Development server
259-
url: http://localhost:5000
260-
- description: Development server
261-
url: http://localhost:5000
258+
- description: null
259+
url: null

examples/lambda_api/scripts/autopep8.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
if [ -z "$1" ]; then
23
autopep8 --in-place --recursive --aggressive
34
else

examples/lambda_api/scripts/clean-env.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# -----------------------------------------------------------------------------
23
# Current file variables
34
# -----------------------------------------------------------------------------

examples/lambda_api/scripts/docker/create-network.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
if test -f .projectrc; then
23
source .projectrc
34
elif test -f ./scripts/.projectrc; then

examples/lambda_api/scripts/docker/exec-sh.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
if test -f .projectrc; then
23
source .projectrc
34
elif test -f ./scripts/.projectrc; then

examples/lambda_api/scripts/flask/run-local.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
python3 -m venv venv
23
source ./venv/bin/activate
34

examples/lambda_api/scripts/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
if test -f "requirements.txt"; then
23
python3 -m pip install -r requirements.txt
34
fi

examples/lambda_api/scripts/localstack/lambda/create-event-source-mapping.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
if [ -z "$1" ]; then
23
echo 'Function name must be informed'
34
exit 1

examples/lambda_api/scripts/localstack/lambda/create-function-from-s3.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# -----------------------------------------------------------------------------
23
# Current file variables
34
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)