Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 1, 2023
1 parent 803b9df commit 71ec4d2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
45 changes: 43 additions & 2 deletions acceptance_tests/tests/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2.2'

services:
app:
app: &app
image: camptocamp/c2cwsgiutils_test_app
environment: &app_env
- SQLALCHEMY_URL
Expand Down Expand Up @@ -32,7 +32,6 @@ services:
- C2C_REDIS_SENTINELS=redis:26379
- PYTHONMALLOC=debug
- DEBUG_LOGCONFIG
#- GUNICORN_WORKERS=2
- GUNICORN_WORKERS=1
- GUNICORN_THREADS=10
# Test problematic environment variable (values contains % and duplicated with different cass)
Expand All @@ -49,6 +48,48 @@ services:
- 8480:8080
- 9090:9090

app2:
<<: *app
# Same as app but with 2 workers and Redis DB 2
environment:
- SQLALCHEMY_URL
- SQLALCHEMY_SLAVE_URL
- PGOPTIONS=-c statement_timeout=1500
- STATS_VIEW=1
- STATSD_ADDRESS=${TEST_IP}:8125
- STATSD_PREFIX=acceptance
- STATSD_TAG_XYZ=zyx
- STATSD_USE_TAGS=1
- C2C_SECRET=changeme
- C2C_LOG_VIEW_ENABLED=1
- C2C_DB_MAINTENANCE_VIEW_ENABLED=1
- C2C_SQL_PROFILER_ENABLED=1
- C2C_DEBUG_VIEW_ENABLED=1
- C2C_PROFILER_PATH=/api_profiler
- C2C_PROFILER_MODULES=c2cwsgiutils c2cwsgiutils_app sqlalchemy request
- C2C_ENABLE_EXCEPTION_HANDLING=1
- GUNICORN_CMD_ARGS="--reload" # don't use this in production
- C2CWSGIUTILS_LOG_LEVEL=DEBUG
- SQL_LOG_LEVEL=DEBUG
- OTHER_LOG_LEVEL=INFO
- COVERAGE=1
- SENTRY_URL=https://14bdb65de3f247c4a89cc7ed53ddec72@sentry.camptocamp.com/5
- SENTRY_CLIENT_ENVIRONMENT=local
- SENTRY_CLIENT_RELEASE=latest
- SENTRY_TAG_SERVICE=app
- C2C_REDIS_SENTINELS=redis:26379
- C2C_REDIS_DB=2
- PYTHONMALLOC=debug
- DEBUG_LOGCONFIG
- GUNICORN_WORKERS=2
- GUNICORN_THREADS=10
# Test problematic environment variable (values contains % and duplicated with different cass)
- TEST='%1'
- test='%2'
- PROMETHEUS_PORT=9090
- PROMETHEUS_MULTIPROC_DIR=/prometheus-metrics
- C2C_PROMETHEUS_APPLICATION_PACKAGES=c2cwsgiutils_app

alembic_master:
image: camptocamp/c2cwsgiutils_test_app
environment:
Expand Down
2 changes: 1 addition & 1 deletion c2cwsgiutils/scripts/stats_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def main() -> None:
"""Run the command."""
success = False
args = _parse_args()
c2cwsgiutils.setup_process.init_logging(args)
c2cwsgiutils.setup_process.init_logging(args.config_uri)
for _ in range(int(os.environ.get("C2CWSGIUTILS_STATS_DB_TRYNUMBER", 10))):
try:
_do_dtats_db(args)
Expand Down

0 comments on commit 71ec4d2

Please sign in to comment.