fix archiver selecting oldest timestamp in database, fix systemd
This commit is contained in:
parent
ee599ddc2e
commit
c2b779397f
|
@ -76,7 +76,7 @@ class EmailDatabase:
|
|||
|
||||
def have_we_done_a_full_sync_at_all(self):
|
||||
cursor = self.conn.cursor()
|
||||
cursor.execute("SELECT * FROM syncs ORDER BY timestamp LIMIT 1")
|
||||
cursor.execute("SELECT * FROM syncs ORDER BY timestamp DESC LIMIT 1")
|
||||
row = cursor.fetchone()
|
||||
cursor.close()
|
||||
if row is not None:
|
||||
|
|
|
@ -8,7 +8,7 @@ User=emailsync
|
|||
Group=emailsync
|
||||
ExecStart=/srv/email/imap-archiver/venv/bin/python3 /srv/email/imap-archiver/run.py --config /srv/email/imap-archiver/config.yml
|
||||
SyslogIdentifier=imap-archiver
|
||||
Restart=always
|
||||
Restart=on-failure
|
||||
WatchdogSec=600
|
||||
|
||||
[Install]
|
||||
|
|
Loading…
Reference in New Issue