Skip to content

Commit

Permalink
fix: GetUnassignedBatchCount
Browse files Browse the repository at this point in the history
  • Loading branch information
yiweichi committed Dec 30, 2024
1 parent 71acdb3 commit 8ce5121
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions coordinator/internal/orm/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func (o *Batch) GetUnassignedBatchCount(ctx context.Context, maxActiveAttempts,
db = db.Where("proving_status = ?", int(types.ProvingTaskUnassigned))
db = db.Where("total_attempts < ?", maxTotalAttempts)
db = db.Where("active_attempts < ?", maxActiveAttempts)
db = db.Where("chunk_proofs_status = ?", int(types.ChunkProofsStatusReady))
db = db.Where("batch.deleted_at IS NULL")
if err := db.Count(&count).Error; err != nil {
return 0, fmt.Errorf("Batch.GetUnassignedBatchCount error: %w", err)
Expand Down

0 comments on commit 8ce5121

Please sign in to comment.