mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Mongo optime format namespaced under 'ts'.
This commit is contained in:
parent
a78e21de90
commit
5eea1c6b76
2 changed files with 8 additions and 3 deletions
|
@ -55,3 +55,8 @@
|
|||
- name: newsblurnet
|
||||
ports:
|
||||
- "5579:5579"
|
||||
|
||||
- name: Restart monitor
|
||||
become: yes
|
||||
shell:
|
||||
cmd: docker restart monitor
|
||||
|
|
|
@ -88,10 +88,10 @@ def db_check_mongo():
|
|||
member_state = member['state']
|
||||
optime = member['optime']
|
||||
if member_state == PRIMARY_STATE:
|
||||
primary_optime = optime['ts']
|
||||
primary_optime = optime['ts'].time
|
||||
elif member_state == SECONDARY_STATE:
|
||||
if not oldest_secondary_optime or optime['ts'] < oldest_secondary_optime:
|
||||
oldest_secondary_optime = optime['ts']
|
||||
if not oldest_secondary_optime or optime['ts'].time < oldest_secondary_optime:
|
||||
oldest_secondary_optime = optime['ts'].time
|
||||
|
||||
if not primary_optime or not oldest_secondary_optime:
|
||||
abort(505)
|
||||
|
|
Loading…
Add table
Reference in a new issue