Skip to content

Commit

Permalink
Black and disabling solo-cache on ci+dev
Browse files Browse the repository at this point in the history
  • Loading branch information
alextreme committed Jan 24, 2023
1 parent c0b5d41 commit 74d1813
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/open_inwoner/accounts/views/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ def process_cases(self, cases: List[Zaak]) -> List[Zaak]:
"end_date": getattr(case, "einddatum", None),
"description": case.omschrijving,
"zaaktype_description": case.zaaktype.omschrijving,
"current_status": case.status.statustype.omschrijving if case.status else "",
"current_status": case.status.statustype.omschrijving
if case.status
else "",
}
)
return updated_cases
Expand Down
8 changes: 4 additions & 4 deletions src/open_inwoner/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@
"IGNORE_EXCEPTIONS": True,
},
},
'local': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
"local": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
},
}

# Django solo caching
SOLO_CACHE_TIMEOUT = 5 # 5 seconds
SOLO_CACHE = 'local' # Avoid Redis overhead
SOLO_CACHE_TIMEOUT = 5 # 5 seconds
SOLO_CACHE = "local" # Avoid Redis overhead

# ZGW API caches
CACHE_ZGW_CATALOGI_TIMEOUT = config("CACHE_ZGW_CATALOGI_TIMEOUT", default=60 * 60 * 24)
Expand Down
3 changes: 3 additions & 0 deletions src/open_inwoner/conf/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@

ENVIRONMENT = "CI"

# Django solo caching (disabled for CI)
SOLO_CACHE = None

#
# Django-axes
#
Expand Down
3 changes: 3 additions & 0 deletions src/open_inwoner/conf/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
"http://localhost:3000",
]

# Django solo caching (disabled for CI)
SOLO_CACHE = None

TWO_FACTOR_PATCH_ADMIN = False

# playwright multi browser
Expand Down
1 change: 0 additions & 1 deletion src/open_inwoner/conf/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@

for db_alias in DATABASES.keys():
del DATABASES[db_alias]["CONN_MAX_AGE"]

0 comments on commit 74d1813

Please sign in to comment.