Skip to content

Commit 04d9f27

Browse files
committed
some changes
1 parent c4bd4d1 commit 04d9f27

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

checker/src/gunicorn.conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import multiprocessing
22

33
worker_class = "uvicorn.workers.UvicornWorker"
4-
workers = min(4, multiprocessing.cpu_count())
4+
workers = max(1, multiprocessing.cpu_count()*2)
55
bind = "0.0.0.0:8000"
66
timeout = 90
77
keepalive = 3600
8-
preload_app = True
8+
preload_app = True

service/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ services:
77
volumes:
88
- ./data:/data:rw
99
tmpfs:
10+
- /tmp
1011
- /var/run
1112
- /service/static/tmp
1213
ports:

service/postgres/init.sql

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,15 @@ SELECT cron.schedule(
467467
'cleanup_every_minute',
468468
'*/5 * * * *',
469469
$$
470-
REFRESH MATERIALIZED VIEW CONCURRENTLY best_replay_per_user;
471470
DELETE FROM "user"
472471
WHERE created_at < now() - INTERVAL '15 minutes';
473472
$$
474473
);
474+
475+
SELECT cron.schedule(
476+
'cleanup_every_minute',
477+
'*/1 * * * *',
478+
$$
479+
REFRESH MATERIALIZED VIEW CONCURRENTLY best_replay_per_user;
480+
$$
481+
);

0 commit comments

Comments
 (0)