Cache get_serverenvironment()
This commit is contained in:
parent
9a48be74e5
commit
44be9f383e
|
|
@ -6,6 +6,7 @@ import locale
|
|||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
from functools import lru_cache
|
||||
|
||||
from odoo import release
|
||||
from odoo.tools.config import config
|
||||
|
|
@ -19,6 +20,7 @@ def _get_output(cmd):
|
|||
return p.communicate()[0].rstrip()
|
||||
|
||||
|
||||
@lru_cache(maxsize=1)
|
||||
def get_server_environment():
|
||||
# inspired by server/bin/service/web_services.py
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in New Issue