Skip to content

Commit 3282146

Browse files
Fixed issue with pax count and total seats not updating
1 parent 73c0e3d commit 3282146

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
letters = string.ascii_lowercase
6060

6161
# Update query types. Queries are imported from above file
62-
update_type = random.choice(["seats", "delay", "gate", "equipment", "ac_seats"])
62+
update_type = random.choice(["seats", "delay", "gate", "equipment"])
6363

6464
aircraft_seat_map = {
6565
"Airbus A320": 170,

mongodbLoadQueries.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,6 @@ def update_queries(minutes=1, seats=1, ac="Dash 8-400", gate="B2", update_type="
5353
return [
5454
{"$set": {"equipment.plane_type": ac}},
5555
]
56-
elif update_type == "ac_seats":
57-
return [
58-
{"$set": {
59-
"equipment.plane_type": ac,
60-
"equipment.total_seats": total_seats,
61-
# Trim passengers if they exceed the new seat count
62-
"passengers": {
63-
"$slice": ["$passengers", total_seats]
64-
}
65-
}}
66-
]
6756

6857

6958

mongodbWorkload.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
from joblib import Parallel, delayed
2+
from joblib import Parallel, delayed # type: ignore
33
import multiprocessing
44
import app # Import your existing multi-threaded app
55
import logging

0 commit comments

Comments
 (0)