Skip to content

Commit

Permalink
fix(helm): move library init code to gunicorn start hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Dec 9, 2024
1 parent 7d3ceeb commit f73421b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions helm-chart/sefaria-project/templates/configmap/gunicorn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ data:
{{- end }}
def on_starting(server):
from reader.startup import init_library_cache
init_library_cache()
def combined_logformat(logger, name, event_dict):
if event_dict.get('logger') == "gunicorn.access":
message = event_dict['event']
Expand Down
2 changes: 0 additions & 2 deletions sefaria/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
application = get_wsgi_application()


from reader.startup import init_library_cache
init_library_cache()
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

0 comments on commit f73421b

Please sign in to comment.