Skip to content

Commit

Permalink
stores: set pricetable and expiry on success
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Dec 4, 2024
1 parent 141fac6 commit fdba89a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stores/sql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1630,8 +1630,8 @@ func RecordHostScans(ctx context.Context, tx sql.Tx, scans []api.HostScan) error
last_scan = ?,
settings = CASE WHEN ? THEN ? ELSE settings END,
v2_settings = CASE WHEN ? THEN ? ELSE settings END,
price_table = CASE WHEN ? AND (price_table_expiry IS NULL OR ? > price_table_expiry) THEN ? ELSE price_table END,
price_table_expiry = CASE WHEN ? AND (price_table_expiry IS NULL OR ? > price_table_expiry) THEN ? ELSE price_table_expiry END,
price_table = CASE WHEN ? THEN ? ELSE price_table END,
price_table_expiry = CASE WHEN ? THEN ? ELSE price_table_expiry END,
successful_interactions = CASE WHEN ? THEN successful_interactions + 1 ELSE successful_interactions END,
failed_interactions = CASE WHEN ? THEN failed_interactions + 1 ELSE failed_interactions END
WHERE public_key = ?
Expand Down

0 comments on commit fdba89a

Please sign in to comment.