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):
|
def have_we_done_a_full_sync_at_all(self):
|
||||||
cursor = self.conn.cursor()
|
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()
|
row = cursor.fetchone()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
if row is not None:
|
if row is not None:
|
||||||
|
|
|
@ -8,7 +8,7 @@ User=emailsync
|
||||||
Group=emailsync
|
Group=emailsync
|
||||||
ExecStart=/srv/email/imap-archiver/venv/bin/python3 /srv/email/imap-archiver/run.py --config /srv/email/imap-archiver/config.yml
|
ExecStart=/srv/email/imap-archiver/venv/bin/python3 /srv/email/imap-archiver/run.py --config /srv/email/imap-archiver/config.yml
|
||||||
SyslogIdentifier=imap-archiver
|
SyslogIdentifier=imap-archiver
|
||||||
Restart=always
|
Restart=on-failure
|
||||||
WatchdogSec=600
|
WatchdogSec=600
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Reference in New Issue