Skip to main content

Queue & Workers

Settings โ†’ Advanced โ†’ Queue & Workers shows the current queue driver, connection type, and worker status for your LeadHub installation.


What the Queue Doesโ€‹

The queue processes all background work in LeadHub:

TaskQueue Priority
Sending emails (transactional, sequences)High
Processing inbound webhooks from lead sourcesHigh
Calling outbound integration APIs (CRM sync, Zapier, etc.)Default
Running automation steps (delays, actions)Default
Generating reports and exportsLow
Sending SMS / WhatsApp messagesDefault

When a lead arrives or an automation triggers, the action is queued rather than executed synchronously. This prevents slow API calls from blocking the web request.


Queue Driversโ€‹

DriverDescription
File (database)Default. Jobs are stored in the jobs database table. Processed by the cron job. No Redis, no Supervisor needed.
RedisFaster, in-memory queue. Requires Redis and Supervisor (or Horizon) on the server. Recommended for high-volume installs.
SyncExecutes jobs immediately in-process. Only used in testing environments. Do not use in production.

Shared hosting: LeadHub's default file-based queue works on any shared hosting plan with a cron job. You do not need Redis, Supervisor, or SSH access.


Processing the Queue (Cron Job)โ€‹

The queue is processed by a single cron job that must be configured on your server.

cPanel Shared Hostingโ€‹

  1. Log in to cPanel โ†’ Cron Jobs.
  2. Set the schedule to every minute (* * * * *).
  3. Set the command to:
    php /home/yourusername/public_html/cron.php >> /dev/null 2>&1
    Replace the path with the absolute path to your LeadHub installation.

See the Shared Hosting Guide for full cPanel instructions.

VPS / Dedicated Server (Linux crontab)โ€‹

* * * * * cd /var/www/leadhub && php artisan queue:work --once --max-time=55 >> /dev/null 2>&1

Or using a process manager (Supervisor):

[program:leadhub-worker]
command=php /var/www/leadhub/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
user=www-data

Worker Status Pageโ€‹

The Queue & Workers page in the admin panel shows:

InformationDescription
ConnectionCurrent queue connection name (from config/queue.php)
DriverThe queue driver in use (database, redis, sync)
HorizonWhether Laravel Horizon is installed (for Redis-based advanced monitoring)

This page is read-only. To change the queue driver, update the QUEUE_CONNECTION in your .env file.


Failed Jobsโ€‹

If a queued job fails (e.g. an integration API returns an error), LeadHub retries up to 3 times with exponential backoff. After 3 failures, the job is marked as failed.

Failed integration deliveries are visible in:

  • Integrations โ†’ Webhook Log โ€” for outbound webhook failures
  • Integrations โ†’ Integration Sync Logs โ€” for CRM/email marketing sync failures

Checking Queue Healthโ€‹

Signs the queue worker is running correctly:

  • Automations trigger within a few minutes of an event
  • Outbound integrations fire shortly after a lead arrives
  • Email sequences send on schedule
  • Exports complete and become downloadable

Signs the queue is NOT running:

  • Automations never fire
  • Integration syncs are stuck as "pending"
  • Emails are never sent

Fix: Check that your cron job is configured and running. Use cPanel โ†’ Cron Jobs to verify the entry exists and has the correct path.


Frequently Asked Questionsโ€‹

Q: How long does it take for a new lead to sync to my CRM? The queue runs every minute by default. Most leads sync within 60โ€“90 seconds of arriving.

Q: Can I run multiple workers for faster processing? Yes, on VPS/dedicated servers you can run multiple queue:work processes via Supervisor. On shared hosting, a single cron job is the maximum.

Q: Do I need Redis? No. The file-based (database) queue is production-ready for typical lead volumes (up to several thousand leads per day). For very high volumes (10,000+ leads/day), Redis is recommended.