@@ -111,6 +111,7 @@ func newQueueBase(
111111 if err != nil {
112112 logger .Fatal ("Failed to get queue state, probably task category is not supported" , tag .Error (err ), tag .Dynamic ("category" , category ))
113113 }
114+ logger .Info ("loading queue state" , tag .Dynamic ("queue-state" , persistenceQueueState ))
114115 queueState := FromPersistenceQueueState (persistenceQueueState )
115116 exclusiveAckLevel , _ := getExclusiveAckLevelAndMaxQueueIDFromQueueState (queueState )
116117
@@ -266,7 +267,7 @@ func (q *queueBase) processNewTasks() bool {
266267 }
267268 q .newVirtualSliceState = remainingVirtualSliceState
268269
269- newVirtualSlice := NewVirtualSlice (newVirtualSliceState , q .taskInitializer , q .queueReader , NewPendingTaskTracker ())
270+ newVirtualSlice := NewVirtualSlice (newVirtualSliceState , q .taskInitializer , q .queueReader , NewPendingTaskTracker (), q . logger )
270271
271272 q .logger .Debug ("processing new tasks" , tag .Dynamic ("inclusiveMinTaskKey" , newVirtualSliceState .Range .InclusiveMinTaskKey ), tag .Dynamic ("exclusiveMaxTaskKey" , newVirtualSliceState .Range .ExclusiveMaxTaskKey ))
272273 q .virtualQueueManager .AddNewVirtualSliceToRootQueue (newVirtualSlice )
@@ -326,7 +327,7 @@ func (q *queueBase) updateQueueState(ctx context.Context) {
326327
327328 // even though the ack level is not updated, we still need to update the queue state
328329 persistenceQueueState := ToPersistenceQueueState (queueState )
329- q .logger .Debug ("store queue state" , tag .Dynamic ("queue-state" , persistenceQueueState ))
330+ q .logger .Debug ("store queue state" , tag .Dynamic ("queue-state" , persistenceQueueState ), tag . PendingTaskCount ( pendingTaskCount ) )
330331 err := q .shard .UpdateQueueState (q .category , persistenceQueueState )
331332 if err != nil {
332333 q .logger .Error ("Failed to update queue state" , tag .Error (err ))
0 commit comments