On This Page

Production Checklist

Check a bot before it runs unattended, with the guide section that explains each item

Before the First Start

  • Run Node.js 24.15 or newer
  • Read the token from process.env.FLUXER_BOT_TOKEN, never from a source file or an image

Explained in: Runtime requirements · Preparing the bot

Failures

  • Return or check every Result, the success or failure each request gives, so a failed send is reported instead of lost
  • Send failures somewhere someone reads, with an onError hook or a log sink
  • Do not resend a write whose outcome is unknown
  • Leave rate limits to the SDK, which waits for HTTP 429 on its own

Explained in: Returning the Result · Failures in one place · An existing logger · Sending once · Retry rules

Running Unattended

  • Turn on only the caches the bot reads, and size them for its communities
  • Give the process manager a stop timeout of about 30 seconds
  • Restart after a crash with a delay
  • Add a session store, so a quick restart resumes and gets the events it missed
  • Watch the connection and each event subscription the bot cannot work without, which runBot already does

Explained in: Cache settings · Shutdown · Restart policy · Resuming after a restart · Watching the connection

Before Each Deploy