ksvmuralidhar commited on
Commit
180e7e5
·
verified ·
1 Parent(s): 67f6359

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -171,8 +171,8 @@ def index():
171
  result_str += f'''<div><p class="unavailable">This app is temporarily unavailable</p></div>'''
172
  else:
173
  last_update_utc = datetime.strptime(redis_client.get('NEWSFETCHTIME'), '%Y-%m-%d %H:%M:%S.%f')
174
- last_update_mins = str((datetime.now() - last_update_utc).seconds // 60)
175
- result_str += f'<p class="srctxt">News aggregated from <b>{src_str}</b>.<br><br>Updated {last_update_mins} mins ago</p>'
176
 
177
  result_str += '''
178
  <div class="input-container">
 
171
  result_str += f'''<div><p class="unavailable">This app is temporarily unavailable</p></div>'''
172
  else:
173
  last_update_utc = datetime.strptime(redis_client.get('NEWSFETCHTIME'), '%Y-%m-%d %H:%M:%S.%f')
174
+ last_update_mins = str(np.ceil((datetime.now() - last_update_utc).seconds / 60))
175
+ result_str += f'<p class="srctxt">News aggregated from <b>{src_str}</b>.<br><br>Updated {last_update_mins} minute(s) ago</p>'
176
 
177
  result_str += '''
178
  <div class="input-container">