Skip to content

Commit

Permalink
monitor "schemas" queue to run refresh_schema (#3459)
Browse files Browse the repository at this point in the history
* monitor "schemas" queue to run refresh_schema

`refresh_schema` tasks won't run because "schemas" queue isn't consumed
with default settings.
and it cause leaking redis storage, a "schemas" list is growing with time.

this PR fix it, adds "schemas" queue to monitor by celery.

* use scheduled_worker for "schemas" queue

instead of "adhoc_worker"
  • Loading branch information
koron authored and arikfr committed Feb 21, 2019
1 parent 4999ab5 commit 8fe1d33
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/docker-compose.cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery"
QUEUES: "queries,scheduled_queries,celery,schemas"
WORKERS_COUNT: 2
cypress:
build:
Expand Down
2 changes: 1 addition & 1 deletion bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

worker() {
WORKERS_COUNT=${WORKERS_COUNT:-2}
QUEUES=${QUEUES:-queries,scheduled_queries,celery}
QUEUES=${QUEUES:-queries,scheduled_queries,celery,schemas}

echo "Starting $WORKERS_COUNT workers for queues: $QUEUES..."
exec /usr/local/bin/celery worker --app=redash.worker -c$WORKERS_COUNT -Q$QUEUES -linfo --maxtasksperchild=10 -Ofair
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery"
QUEUES: "queries,scheduled_queries,celery,schemas"
WORKERS_COUNT: 2
restart: always
redis:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
REDASH_LOG_LEVEL: "INFO"
REDASH_REDIS_URL: "redis://redis:6379/0"
REDASH_DATABASE_URL: "postgresql://postgres@postgres/postgres"
QUEUES: "queries,scheduled_queries,celery"
QUEUES: "queries,scheduled_queries,celery,schemas"
WORKERS_COUNT: 2
redis:
image: redis:3-alpine
Expand Down
2 changes: 1 addition & 1 deletion setup/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
<<: *redash-service
command: worker
environment:
QUEUES: "scheduled_queries"
QUEUES: "scheduled_queries,schemas"
WORKERS_COUNT: 1
adhoc_worker:
<<: *redash-service
Expand Down

0 comments on commit 8fe1d33

Please sign in to comment.