chat gpt said this would work and i trust it like 2 %
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user