Browse Source

added try exception for period_data not available, running through now anyway

master
alpcentaur 9 months ago
parent
commit
d6427a9cdc
3 changed files with 9 additions and 5 deletions
  1. +8
    -4
      fdb_spider_interface.py
  2. +1
    -1
      new_message_file.txt
  3. +0
    -0
      roomhistories/65afd8b77954218b501634f2.txt

+ 8
- 4
fdb_spider_interface.py View File

@ -655,10 +655,14 @@ if __name__ == '__main__':
now = datetime.datetime.now()
now_formatted = dateutil.parser.parse(str(now))
delta = period_data_formatted - now_formatted
print('delta', delta, int(delta.days))
if message_was_already_there == False and int(delta.days) < int(room_deadline_days):
try:
delta = period_data_formatted - now_formatted
days_to_check = delta.days
except Exception as e:
days_to_check = int(room_deadline_days) - 1
print('calc of delta did now work, original error is:', e)
#print('delta', delta, int(delta.days))
if message_was_already_there == False and int(days_to_check) < int(room_deadline_days):

+ 1
- 1
new_message_file.txt View File

@ -1 +1 @@
updaterooms 65afc67d7954218b50162c22§%§%kr2Qt7t4a3dNCDYqm
updaterooms 65afd8b77954218b501634f2§%§%Z4SCmA6Ydbs7YHHHo

+ 0
- 0
roomhistories/65afd8b77954218b501634f2.txt View File


Loading…
Cancel
Save