Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
simstadtpy
Commits
c8bed3df
Commit
c8bed3df
authored
Mar 13, 2026
by
Eric Duminil
Browse files
TODO?
parent
031929a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/simstadt/utils.py
View file @
c8bed3df
...
...
@@ -42,6 +42,7 @@ def clean_old_workflows(folder: Path, pattern: str = "20*.flow", hours: int = 1)
Only deletes paths whose names match the random_id timestamp pattern.
"""
# TODO: Should it be called before simulation too?
cutoff
=
(
datetime
.
datetime
.
now
()
-
datetime
.
timedelta
(
hours
=
hours
)).
strftime
(
"%Y%m%d_%H%M_"
)
for
path
in
sorted
(
folder
.
glob
(
pattern
)):
if
m
:
=
WORKFLOW_FOLDER_PATTERN
.
match
(
path
.
name
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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