Skip to content

Commit e4c0779

Browse files
committed
fix: comments
1 parent 1c5d88d commit e4c0779

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

coordinator/internal/logic/provertask/batch_prover_task.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (bp *BatchProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinato
6767
if strings.HasPrefix(taskCtx.ProverName, ExternalProverNamePrefix) {
6868
unassignedBatchCount, getCountError := bp.batchOrm.GetUnassignedBatchCount(ctx.Copy(), maxActiveAttempts, maxTotalAttempts)
6969
if getCountError != nil {
70-
log.Error("failed to get unassigned chunk proving tasks count", "height", getTaskParameter.ProverHeight, "err", err)
70+
log.Error("failed to get unassigned batch proving tasks count", "height", getTaskParameter.ProverHeight, "err", err)
7171
return nil, ErrCoordinatorInternalFailure
7272
}
7373
// Assign external prover if unassigned task number exceeds threshold
@@ -83,14 +83,14 @@ func (bp *BatchProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinato
8383
var assignedOffset, unassignedOffset = 0, 0
8484
tmpAssignedBatchTasks, getTaskError := bp.batchOrm.GetAssignedBatches(ctx.Copy(), maxActiveAttempts, maxTotalAttempts, 50)
8585
if getTaskError != nil {
86-
log.Error("failed to get assigned chunk proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
86+
log.Error("failed to get assigned batch proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
8787
return nil, ErrCoordinatorInternalFailure
8888
}
8989
// Why here need get again? In order to support a task can assign to multiple prover, need also assign `ProvingTaskAssigned`
9090
// chunk to prover. But use `proving_status in (1, 2)` will not use the postgres index. So need split the sql.
9191
tmpUnassignedBatchTask, getTaskError := bp.batchOrm.GetUnassignedBatches(ctx.Copy(), maxActiveAttempts, maxTotalAttempts, 50)
9292
if getTaskError != nil {
93-
log.Error("failed to get unassigned chunk proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
93+
log.Error("failed to get unassigned batch proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
9494
return nil, ErrCoordinatorInternalFailure
9595
}
9696
for {

coordinator/internal/logic/provertask/bundle_prover_task.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (bp *BundleProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinat
6767
if strings.HasPrefix(taskCtx.ProverName, ExternalProverNamePrefix) {
6868
unassignedBundleCount, getCountError := bp.bundleOrm.GetUnassignedBundleCount(ctx.Copy(), maxActiveAttempts, maxTotalAttempts)
6969
if getCountError != nil {
70-
log.Error("failed to get unassigned chunk proving tasks count", "height", getTaskParameter.ProverHeight, "err", err)
70+
log.Error("failed to get unassigned batch proving tasks count", "height", getTaskParameter.ProverHeight, "err", err)
7171
return nil, ErrCoordinatorInternalFailure
7272
}
7373
// Assign external prover if unassigned task number exceeds threshold
@@ -83,14 +83,14 @@ func (bp *BundleProverTask) Assign(ctx *gin.Context, getTaskParameter *coordinat
8383
var assignedOffset, unassignedOffset = 0, 0
8484
tmpAssignedBundleTasks, getTaskError := bp.bundleOrm.GetAssignedBundles(ctx.Copy(), maxActiveAttempts, maxTotalAttempts, 50)
8585
if getTaskError != nil {
86-
log.Error("failed to get assigned chunk proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
86+
log.Error("failed to get assigned batch proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
8787
return nil, ErrCoordinatorInternalFailure
8888
}
8989
// Why here need get again? In order to support a task can assign to multiple prover, need also assign `ProvingTaskAssigned`
9090
// chunk to prover. But use `proving_status in (1, 2)` will not use the postgres index. So need split the sql.
9191
tmpUnassignedBundleTask, getTaskError := bp.bundleOrm.GetUnassignedBundles(ctx.Copy(), maxActiveAttempts, maxTotalAttempts, 50)
9292
if getTaskError != nil {
93-
log.Error("failed to get unassigned chunk proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
93+
log.Error("failed to get unassigned batch proving tasks", "height", getTaskParameter.ProverHeight, "err", getTaskError)
9494
return nil, ErrCoordinatorInternalFailure
9595
}
9696
for {

0 commit comments

Comments
 (0)