Skip to content

Commit

Permalink
Fix: decrease delay for getting tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jan 14, 2022
1 parent da654e7 commit 6755a72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/metadata/models/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (d dbLogger) AfterQuery(c context.Context, q *pg.QueryEvent) error {

// GetContractMetadata -
func (db *RelativeDatabase) GetContractMetadata(network string, status Status, limit, offset, retryCount int) (all []ContractMetadata, err error) {
query := db.DB().Model(&all).Where("status = ?", status).Where("network = ?", network).Where("extract(epoch from now()) - updated_at > 60")
query := db.DB().Model(&all).Where("status = ?", status).Where("network = ?", network).Where("extract(epoch from now()) - updated_at > 10")
if limit > 0 {
query.Limit(limit)
}
Expand Down Expand Up @@ -123,7 +123,7 @@ func (db *RelativeDatabase) CountContractsByStatus(network string, status Status

// GetTokenMetadata -
func (db *RelativeDatabase) GetTokenMetadata(network string, status Status, limit, offset, retryCount int) (all []TokenMetadata, err error) {
query := db.DB().Model(&all).Where("status = ?", status).Where("network = ?", network).Where("extract(epoch from now()) - updated_at > 60")
query := db.DB().Model(&all).Where("status = ?", status).Where("network = ?", network).Where("extract(epoch from now()) - updated_at > 10")
if limit > 0 {
query.Limit(limit)
}
Expand Down

0 comments on commit 6755a72

Please sign in to comment.