Closed MeshanKhosla closed 2 months ago
@MeshanKhosla Just a thought, but, I feel like maybe we can put enqueuing logic into queue class, wdyt?
@MeshanKhosla Just a thought, but, I feel like maybe we can put enqueuing logic into queue class, wdyt?
We can put the logic there, do you think the API should be
const queue = QstashClient.queue()
queue.enqueue({queueName: 'abc'}}
or
const queue = QstashClient.queue({queueName: 'abc'})
queue.enqueue({msg: ...})
or
const queue = QstashClient.enqueue({queueName: 'abc', ...})
(with the logic in the queue class)
I personally am not a big fan of the first option, it seems a bit redundant
Second one looks better IMO. Reason is you can define it once then keep sending new messages with the same instance
Add support for QStash Queue