File tree Expand file tree Collapse file tree
cli/polyaxon/_sidecar/container/monitors Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55import aiofiles
66
7- from clipped .utils .paths import check_or_create_path
7+ from clipped .utils .paths import check_or_create_path , set_permissions
88from kubernetes_asyncio .client .models import V1Pod
99
1010from polyaxon ._contexts import paths as ctx_paths
@@ -34,8 +34,8 @@ async def sync_logs(
3434
3535 path_from = "{}/{}.jsonl" .format (path_from , pod .metadata .name )
3636 check_or_create_path (path_from , is_dir = False )
37- async with aiofiles .open (path_from , "a" ) as filepath :
37+ async with aiofiles .open (path_from , "a" ) as outfile :
3838 _logs = V1Logs .construct (logs = logs )
39- await filepath .write (_logs .get_jsonl_events ())
40-
39+ await outfile .write (_logs .get_jsonl_events ())
40+ set_permissions ( path_from )
4141 return last_time
Original file line number Diff line number Diff line change 11import aiofiles
22
33from clipped .utils .json import orjson_dumps
4- from clipped .utils .paths import check_or_create_path
4+ from clipped .utils .paths import check_or_create_path , set_permissions
55
66from polyaxon ._contexts import paths as ctx_paths
77from polyaxon ._flow import V1RunKind
@@ -20,5 +20,6 @@ async def sync_spec(
2020 path_from = ctx_paths .CONTEXT_MOUNT_ARTIFACTS_FORMAT .format (run_uuid )
2121 path_from = "{}/outputs/spec.json" .format (path_from )
2222 check_or_create_path (path_from , is_dir = False )
23- async with aiofiles .open (path_from , "w" ) as filepath :
24- await filepath .write (orjson_dumps (op_spec ))
23+ async with aiofiles .open (path_from , "w" ) as outfile :
24+ await outfile .write (orjson_dumps (op_spec ))
25+ set_permissions (path_from )
You can’t perform that action at this time.
0 commit comments