Update agent in database when sleep setting is changed to display latest checkin correctly.

This commit is contained in:
Jakob Friedl
2025-05-28 11:14:30 +02:00
parent 4397f728de
commit d35b1d0a0d
6 changed files with 23 additions and 7 deletions

View File

@@ -1,8 +1,13 @@
import nanoid, sequtils, strutils, strformat, terminal, times
import ../../types
import ../../db/database
proc taskExecuteSleep*(cq: Conquest, delay: int) =
# Update 'sleep' value in database
if not cq.dbUpdateSleep(cq.interactAgent.name, delay):
return
# Create a new task
let
date: string = now().format("dd-MM-yyyy HH:mm:ss")