Skip to content

Commit

Permalink
Add args
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsinclair committed Oct 28, 2022
1 parent 2d0b80c commit 39d271e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions database/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ func contains(slice []string, item string) bool {
// CleanUpWasmExecuteContractEvents cleans up events that are too old to stop database bloat
func (db *Db) CleanUpWasmExecuteContractEvents() error {

stmt := `DELETE FROM wasm_execute_contract_event WHERE executed_at < CURRENT_DATE - interval '2 days';`
var args []interface{}

stmt := `DELETE FROM wasm_execute_contract_event WHERE executed_at < CURRENT_DATE - interval '2 days'`

_, err := db.Sql.Exec(stmt)
_, err := db.Sql.Exec(stmt, args...)
if err != nil {
return fmt.Errorf("error while cleaning up wasm execute contracts: %s", err)
}
Expand Down

0 comments on commit 39d271e

Please sign in to comment.