Does `last_sync_time` still get stuck for others?

Currently on 18.4.0-beta-3

I set up a service file to clean it up automatically:

#!/bin/bash 

# DESCRIPTION
# Check the last atuin sync. If over two days, delete the file to force a new sync

lastSync="$(echo $(( ($(date +%s) - $(date -d "$(cat /home/macallik/.local/share/atuin/last_sync_time| cut -d'T' -f1)" +%s)) / 86400 )))"

if [[ $lastSync -ge 2 ]]; then /usr/bin/trash /home/macallik/.local/share/atuin/last_sync_time; fi
#if [[ -f path/to/file ]]; then echo "Condition is true"; fi
exit 0
1 Like

There’s a situation where the file somehow gets corrupted, and I honestly have no idea what it is. It’s never happened to me (helpful…), and I think realistically we should shift this to something like sqlite so we know locking/etc is in place