Examples
Messages
You can run the async code by importing Client
from upstash_qstash.asyncio
and awaiting the methods.
Note: Messages are removed from the database shortly after they’re delivered, so you may not be able to retrieve a message after.
Retrieve a message
from upstash_qstash import Client
client = Client("<QSTASH_TOKEN>")
messages = client.messages()
msg = messages.get("msg_id")
Cancel/delete a message
from upstash_qstash import Client
client = Client("<QSTASH_TOKEN>")
messages = client.messages()
msg = messages.delete("msg_id")