SextantDocs
v1.9legacy
v2.4latestv1.9legacy

Switching keeps you on the same page when it exists in the other version.

You are reading the docs for Sextant v1.9, which no longer receives updates. This page has a current version: read it in v2.

Quickstart

Enqueue a job with the v1 SDKs and see a worker run it.

Updated Overview Version v1.9

With sextant start running, enqueue a job from Node or Python and register a handler with the same SDK.

NodeTypeScript
import Sextant from 'sextant';

const client = new Sextant({ key: process.env.SEXTANT_KEY });

client.handle('send-receipt', async (payload) => {
  await mailer.send(payload.to, 'Your receipt');
});

await client.enqueue('send-receipt', { to: '[email protected]' }, { retries: 3, delay: 60 });
client.work();
PythonPython
import os
import sextant

client = sextant.Client(key=os.environ["SEXTANT_KEY"])

@client.handle("send-receipt")
def send_receipt(payload):
    mailer.send(payload["to"], "Your receipt")

client.enqueue("send-receipt", {"to": "[email protected]"}, retries=3, delay=60)
client.work()

delay is in seconds. retries is the number of retries after the first attempt, so retries=3 allows four attempts.

Check the result

Shell
sextant jobs --status done