Fixed nagging handling of empty rows. Increased polling interval
This commit is contained in:
parent
645735eade
commit
ec1d678c5c
|
|
@ -184,7 +184,7 @@ async def nag_callback(slack, msg, match):
|
|||
assigns = house_management.import_assignments()
|
||||
|
||||
# Filter to day
|
||||
assigns = [assign for assign in assigns if assign.job.day_of_week.lower() == day]
|
||||
assigns = [assign for assign in assigns if assign is not None and assign.job.day_of_week.lower() == day]
|
||||
|
||||
# Filter signed off
|
||||
assigns = [assign for assign in assigns if assign.signer is None]
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ def message_stream(slack: SlackClient) -> Generator[dict, None, None]:
|
|||
if slack.rtm_connect(with_team_state=False, auto_reconnect=True):
|
||||
print("Waiting for messages")
|
||||
while True:
|
||||
sleep(1)
|
||||
sleep(0.1)
|
||||
update = slack.rtm_read()
|
||||
for item in update:
|
||||
if item.get('type') == 'message':
|
||||
|
|
|
|||
Loading…
Reference in New Issue