Commit 6d252907 by Thomas Gambier Committed by Rafael Monnerat

[webrunner]: use latest key in equeue.db to get last backup date

in some webrunner, there are 2 keys in equeue.db:

```
>>> print(db.keys())
['/srv/slapgrid/slappart18/bin//runner-importer', '/srv/slapgrid/slappart18/bin/runner-importer']
```

We suppose that the 2nd key was used after the first key so we take the
timestamp of the last key.

/reviewed-on !578
1 parent 010b8afd
......@@ -46,7 +46,7 @@ md5sum = d21472f0e58f928fb827f2cbf22c4d4a
[resilient-web-takeover-cgi-script-download]
filename = resilient-web-takeover-cgi-script.py.in
md5sum = 9d258d41eeef66f44f361adaa15cbd71
md5sum = 60d4912fdf5e8dafaba9d9f333aa9e36
[template-wrapper]
filename = templates/wrapper.in
......
......@@ -42,7 +42,7 @@ def getLatestBackupDate():
if not db.keys():
result = False
else:
last_backup = db[db.keys()[0]]
last_backup = db[db.keys()[-1]]
for callback in db.keys():
timestamp = float(db[callback])
if timestamp < last_backup:
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!