Spaces:
Sleeping
Sleeping
LapStore commited on
Commit ·
5564f37
1
Parent(s): 4a84fec
making full cycle
Browse files- traffic_utils.py +7 -2
traffic_utils.py
CHANGED
|
@@ -34,9 +34,14 @@ import asyncio
|
|
| 34 |
|
| 35 |
async def open_signal(tl_id,state_,duration,delay):
|
| 36 |
check_time = 10
|
| 37 |
-
asyncio.sleep(delay)
|
|
|
|
| 38 |
state.request[tl_id]['State'] = state.status_chk
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
if (state.request[tl_id]['accepted']== True):
|
| 41 |
state.request[tl_id]['State'] = state_
|
| 42 |
state.request[tl_id]['time'] = time.time()
|
|
|
|
| 34 |
|
| 35 |
async def open_signal(tl_id,state_,duration,delay):
|
| 36 |
check_time = 10
|
| 37 |
+
await asyncio.sleep(delay)
|
| 38 |
+
|
| 39 |
state.request[tl_id]['State'] = state.status_chk
|
| 40 |
+
|
| 41 |
+
check_time = 10
|
| 42 |
+
await asyncio.sleep(check_time)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
if (state.request[tl_id]['accepted']== True):
|
| 46 |
state.request[tl_id]['State'] = state_
|
| 47 |
state.request[tl_id]['time'] = time.time()
|