Skip to content

Commit 284eb0e

Browse files
committed
Partition data dir by route id
Closes Have replicate partition data-dirs by dongle id #48
1 parent e235d87 commit 284eb0e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

predict.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ def predict(
6868
# Print the notes
6969
print(notes)
7070

71-
# Get the full absolute path of `./shared/data_dir`
72-
data_dir = "./shared/data_dir"
71+
# Get the dongle ID from the route. It's everything before the first pipe.
72+
dongleID = route.split("|")[0]
73+
74+
# Partition the data dir by the dongle ID from the route
75+
data_dir = os.path.join("./shared/data_dir", dongleID)
7376

7477
if renderType == "ui":
7578
# Download the route data

0 commit comments

Comments
 (0)