feat: add task completion

This commit is contained in:
sujit
2024-10-30 12:57:49 +05:45
parent fb05a97860
commit f5bd30b801
2 changed files with 5 additions and 1 deletions

View File

@@ -483,3 +483,7 @@ func (b *Broker) backoffRetry(queue *Queue, task *QueuedTask, delay time.Duratio
} }
return delay return delay
} }
func (b *Broker) URL() string {
return b.opts.brokerAddr
}

View File

@@ -126,7 +126,7 @@ func (tm *DAG) GetKey() string {
} }
func (tm *DAG) AssignTopic(topic string) { func (tm *DAG) AssignTopic(topic string) {
tm.consumer = mq.NewConsumer(topic, topic, tm.ProcessTask, mq.WithRespondPendingResult(false)) tm.consumer = mq.NewConsumer(topic, topic, tm.ProcessTask, mq.WithRespondPendingResult(false), mq.WithBrokerURL(tm.server.URL()))
tm.consumerTopic = topic tm.consumerTopic = topic
} }