Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
c8a176e2
Unverified
Commit
c8a176e2
authored
Dec 09, 2024
by
Jakob Görgen
Browse files
symphony/runner/simbricks/runner: attach artifact to db run object once simulation finished
parent
9aa93461
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
symphony/runner/simbricks/runner/__main__.py
symphony/runner/simbricks/runner/__main__.py
+10
-7
No files found.
symphony/runner/simbricks/runner/__main__.py
View file @
c8a176e2
...
...
@@ -57,8 +57,9 @@ async def amain():
await
asyncio
.
sleep
(
5
)
continue
print
(
f
'Preparing run
{
run_obj
[
"id"
]
}
'
)
run_workdir
=
workdir
/
f
'run-
{
run_obj
[
"id"
]
}
'
run_id
=
run_obj
[
"id"
]
print
(
f
'Preparing run
{
run_id
}
'
)
run_workdir
=
workdir
/
f
'run-
{
run_id
}
'
run_workdir
.
mkdir
(
parents
=
True
)
inst_obj
=
await
sb_client
.
get_instantiation
(
run_obj
[
'instantiation_id'
])
...
...
@@ -76,14 +77,16 @@ async def amain():
inst
.
preserve_tmp_folder
=
False
inst
.
create_checkpoint
=
True
print
(
f
'Starting run
{
run_
obj
[
"id"
]
}
'
)
print
(
f
'Starting run
{
run_
id
}
'
)
await
rc
.
update_run
(
run_
obj
[
'id'
]
,
'running'
,
''
)
await
rc
.
update_run
(
run_
id
,
'running'
,
''
)
out
=
await
run_instantiation
(
inst
)
if
inst
.
create_artifact
:
await
sb_client
.
set_run_artifact
(
run_id
,
inst
.
artifact_name
)
print
(
f
'Finished run
{
run_
obj
[
"id"
]
}
'
)
print
(
f
'Finished run
{
run_
id
}
'
)
await
rc
.
update_run
(
run_
obj
[
'id'
]
,
'completed'
,
json
.
dumps
(
out
))
await
rc
.
update_run
(
run_
id
,
'completed'
,
json
.
dumps
(
out
))
def
main
():
asyncio
.
run
(
amain
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment