File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
contentcuration/contentcuration Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ class ContentConfig(AppConfig):
88 name = 'contentcuration'
99
1010 def ready (self ):
11+ # Import signals
12+ import contentcuration .signals # noqa
13+
1114 if settings .AWS_AUTO_CREATE_BUCKET and not is_gcs_backend ():
1215 from contentcuration .utils .minio_utils import ensure_storage_bucket_public
1316 ensure_storage_bucket_public ()
Original file line number Diff line number Diff line change 1+ from django .db .backends .signals import connection_created
2+ from django .dispatch import receiver
3+
4+
5+ @receiver (connection_created )
6+ def set_jit (sender , connection , ** kwargs ):
7+ """
8+ Disable Just-In-Time compilation for PostgreSQL databases, at least until we can
9+ optimize its use.
10+ https://www.postgresql.org/docs/12/runtime-config-query.html#GUC-JIT
11+ """
12+ if connection .vendor == 'postgresql' :
13+ with connection .cursor () as cursor :
14+ cursor .execute ("SET jit = 'off';" )
You can’t perform that action at this time.
0 commit comments