mirror of
				https://github.com/oarkflow/mq.git
				synced 2025-10-31 15:06:20 +08:00 
			
		
		
		
	feat: add task completion
This commit is contained in:
		| @@ -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 | ||||||
|  | } | ||||||
|   | |||||||
| @@ -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 | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 sujit
					sujit