Skip to content
Snippets Groups Projects
Commit be2bec32 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-1144: use rough guesstimate of cache size for 10 subtasks times 488 dataproducts per subtask

parent b0e76ca4
No related branches found
No related tags found
1 merge request!635Resolve TMSS-1144
from lofar.sas.tmss.tmss.exceptions import *
from lofar.sas.tmss.tmss.tmssapp.models.scheduling import Dataproduct, SubtaskType, Subtask, SubtaskOutput, SIPidentifier, HashAlgorithm
from lofar.sas.tmss.tmss.tmssapp.models.scheduling import Dataproduct, SubtaskType, Subtask, SubtaskOutput, SubtaskState, SIPidentifier, HashAlgorithm
from lofar.sas.tmss.tmss.tmssapp.models.specification import Datatype, Dataformat
from lofar.lta.sip import siplib, ltasip, validator, constants
from lofar.common.json_utils import add_defaults_to_json_object_for_schema
......@@ -127,6 +127,7 @@ def add_subbtask_and_input_dataproducts_to_sip(subtask: Subtask, sip: siplib.Sip
sip.add_related_dataproduct(sip_dataproduct, return_xml=False)
@lru_cache(maxsize=10, typed=False)
def create_sip_representation_for_subtask(subtask: Subtask):
"""
Extract info from the TMSS subtask and create a sip object representation corresponding to the type of the subtask
......@@ -273,7 +274,7 @@ def create_sip_representation_for_subtask(subtask: Subtask):
raise TMSSException("The Subtask type %s cannot be represented in a SIP" % subtask.specifications_template.type.value)
@lru_cache(maxsize=256, typed=False)
@lru_cache(maxsize=10*488, typed=False)
def create_sip_representation_for_dataproduct(dataproduct: Dataproduct):
"""
Extract info from the TMSS dataproduct and creates a SIP object representation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment