Skip to content

Commit

Permalink
Load medicines to in-memory on django start (#1432)
Browse files Browse the repository at this point in the history
* load medicines to inmemory on django start

* import when gunicorn starts instead

* load at end of wsgi instead
  • Loading branch information
rithviknishad authored Jul 5, 2023
1 parent 9667c93 commit 44fb402
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions care/facility/static_data/medibase.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@
}
)

# MedibaseMedicineTable.insert_many(medibase_objects)

MedibaseMedicineTable.create_index("id", unique=True)
MedibaseMedicineTable.create_search_index("searchable")
2 changes: 2 additions & 0 deletions config/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)

from care.facility.static_data.medibase import MedibaseMedicineTable # noqa

0 comments on commit 44fb402

Please sign in to comment.