#!/usr/bin/env bash
set -Eeuo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")/.."

exec php artisan queue:work database \
  --queue=tenant-provisioning,tenant-migrations,tenant-backups,default \
  --sleep=3 \
  --tries=3 \
  --backoff=30,120,600 \
  --timeout=900 \
  --max-time=3600 \
  --max-jobs=500 \
  --memory=256 \
  --stop-when-empty=false
