File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 11import json
22import logging
3- import os
43import sys
54import time
65from asyncio import CancelledError
@@ -47,22 +46,22 @@ class PortTypeName(str, Enum):
4746
4847_logger = logging .getLogger (__name__ )
4948
50- # OUTPUTS section
5149
52-
53- def _get_size_of_value (value : tuple [ItemConcreteValue | None , SetKWargs | None ]) -> int :
54- if value is None :
50+ def _get_size_of_value (
51+ value : tuple [ItemConcreteValue | None , SetKWargs | None ],
52+ ) -> int :
53+ concrete_value , _ = value
54+ if concrete_value is None :
5555 return 0
56- if isinstance (value , Path ):
56+ if isinstance (concrete_value , Path ):
5757 # if symlink we need to fetch the pointer to the file
5858 # relative symlink need to know which their parent is
5959 # in oder to properly resolve the path since the workdir
6060 # does not equal to their parent dir
61- path = value
62- if value .is_symlink ():
63- path = Path (value .parent ) / Path (os .readlink (value ))
64- size_bytes = path .stat ().st_size
65- return size_bytes
61+ path = concrete_value
62+ if concrete_value .is_symlink ():
63+ path = Path (concrete_value .parent ) / Path (Path .readlink (concrete_value ))
64+ return path .stat ().st_size
6665 return sys .getsizeof (value )
6766
6867
You can’t perform that action at this time.
0 commit comments