upstash / qstash-js

Message queue for serverless
https://docs.upstash.com/qstash
MIT License
133 stars 11 forks source link

Schedule messages to be delivered at a future date #40

Open marcus-sa opened 11 months ago

marcus-sa commented 11 months ago

Functionality to schedule messages to be delivered at a future date

chronark commented 11 months ago

Hey, you can set a delay in seconds when publishing a message, does that not work for you?

Or absolute timestamp: https://github.com/upstash/sdk-qstash-ts/blob/359a55ee6d87d1d8af94abbcddc7b76d3d97d145/pkg/client/client.ts#L88

kristianeboe commented 10 months ago

Maybe he ran into the same issue as me, trying to pass in notBefore and delay timestamps in milliseconds instead of seconds.

It would be pretty sweet if the api client could support milliseconds as that is the standard in js. Here is what I do now notBefore: Math.floor(nextInviteDate?.getTime() / 1000),