From afd6b12acf6cb5ed0d130294441d45110bdc36e3 Mon Sep 17 00:00:00 2001 From: pigwin Date: Thu, 9 Jan 2025 19:54:11 +0000 Subject: [PATCH] chat gpt said this would work and i trust it like 2 % --- export/database.go | 1 + valki/commands.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/export/database.go b/export/database.go index 3841499..6789c17 100644 --- a/export/database.go +++ b/export/database.go @@ -418,6 +418,7 @@ func DBData(data *data.Data) { serviceDeliveryJsonObject["Updates"] = updateCount serviceDeliveryJsonObject["EstimatedCallInserts"] = estimatedCallInsertCount serviceDeliveryJsonObject["EstimatedCallUpdates"] = estimatedCallUpdateCount + serviceDeliveryJsonObject["EstimatedCallNone"] = estimatedCallNoneCount serviceDeliveryJsonObject["RecordedCallInserts"] = recordedCallInsertCount serviceDeliveryJsonObject["RecordedCallUpdates"] = recordedCallUpdateCount diff --git a/valki/commands.go b/valki/commands.go index 3195fc4..a17746f 100644 --- a/valki/commands.go +++ b/valki/commands.go @@ -3,12 +3,13 @@ package valki import ( "context" "fmt" + "time" "github.com/valkey-io/valkey-go" ) func SetValkeyValue(ctx context.Context, client valkey.Client, key, value string) error { - err := client.Do(ctx, client.B().Set().Key(key).Value(value).Build()).Error() + err := client.Do(ctx, client.B().Set().Key(key).Value(value).Ex(time.Hour).Build()).Error() if err != nil { return fmt.Errorf("failed to set value in Valkey: %v", err) }