Added multi-time reservation for mornings and afternoon.
This commit is contained in:
parent
6276945d57
commit
24cbe76cfc
1 changed files with 20 additions and 7 deletions
17
main.py
17
main.py
|
|
@ -30,8 +30,21 @@ def main():
|
|||
while start_time.day == datetime.datetime.now(pytz.timezone('Europe/Berlin')).day:
|
||||
time.sleep(1)
|
||||
|
||||
start = get_future_datetime(hour="13:00:00")
|
||||
end = get_future_datetime(hour="18:00:00")
|
||||
times = [
|
||||
{
|
||||
'start': '13:00:00',
|
||||
'end': '18:00:00'
|
||||
},
|
||||
{
|
||||
'start': '09:00:00',
|
||||
'end': '12:00:00'
|
||||
}
|
||||
]
|
||||
|
||||
for time_ in times:
|
||||
|
||||
start = get_future_datetime(hour=time_['start'])
|
||||
end = get_future_datetime(hour=time_['end'])
|
||||
|
||||
resource_id = booking.find_available_resource(start, end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue