Skip to content

Commit

Permalink
chore: tmp fix on routines - to remove dumb options
Browse files Browse the repository at this point in the history
  • Loading branch information
robcxyz committed Feb 4, 2025
1 parent 4478d8e commit fdb996c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
15 changes: 7 additions & 8 deletions src/crud/crud_base_select.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package crud

import (
"github.com/sudoblockio/icon-transformer/config"
"github.com/sudoblockio/icon-transformer/models"
)

Expand Down Expand Up @@ -112,13 +111,13 @@ func (m *Crud[Model, ModelOrm]) SelectBatchOrder(
db = db.Offset(skip)
}
db = db.Order("address")
if config.Config.RedisRecoveryContractsOnly {
db = db.Where("is_contract = true")
}

if config.Config.RedisRecoverySkipContracts {
db = db.Where("is_contract = false")
}
//if config.Config.RedisRecoveryContractsOnly {
// db = db.Where("is_contract = true")
//}
//
//if config.Config.RedisRecoverySkipContracts {
// db = db.Where("is_contract = false")
//}
output := &[]Model{}
db = db.Find(output)
return output, db.Error
Expand Down
6 changes: 3 additions & 3 deletions src/routines/routines.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ func StartRecovery() {
//countAddressesToRedisRoutine()

// By address
if config.Config.RedisRecoveryAddresses {
LoopRoutine(crud.GetCrud(models.Address{}, models.AddressORM{}), addressRoutines)
}
//if config.Config.RedisRecoveryAddresses {
// LoopRoutine(crud.GetCrud(models.Address{}, models.AddressORM{}), addressRoutines)
//}
// By token address
if config.Config.RedisRecoveryTokenAddresses {
LoopRoutine(crud.GetCrud(models.TokenAddress{}, models.TokenAddressORM{}), tokenAddressRoutines)
Expand Down

0 comments on commit fdb996c

Please sign in to comment.