mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 17:02:55 +08:00
16 lines
453 B
Python
16 lines
453 B
Python
from cache import AsyncLRU
|
|
|
|
from felicity.apps.setup.services import LaboratoryService, LaboratorySettingService
|
|
|
|
|
|
@AsyncLRU(maxsize=128)
|
|
async def get_laboratory():
|
|
lab = await LaboratoryService().get_by_setup_name()
|
|
return lab
|
|
|
|
|
|
@AsyncLRU(maxsize=128)
|
|
async def get_laboratory_setting():
|
|
lab = await LaboratoryService().get_by_setup_name()
|
|
setting = await LaboratorySettingService().get(laboratory_uid=lab.uid)
|
|
return lab, setting
|