Background Jobs for Heavy Operations
Some operations take time. Generating a 500-page report. Importing 10,000 records from a CSV. Syncing a full product catalog from a supplier API. Sending a batch of email notifications.
These operations shouldn't freeze your interface, block other users, or require a team member to wait.
Work That Happens Behind the Scenes
Background jobs in Swifty run asynchronously — outside the main request flow, on dedicated processing capacity. Trigger a bulk export, and Swifty acknowledges the request immediately. The export happens in the background. When it's ready, you get a notification with a download link.
You don't wait. You don't watch a progress bar. You do something else while the work happens.
A Job Registry You Can See
Running and completed background jobs are visible in the job registry. Every background operation shows:
- What the job is and what triggered it
- Current status: queued, running, completed, failed
- Start time and completion time
- Output or error details
There's no black box. You can see what the platform is doing, what's finished, and what (if anything) went wrong.
Retry and Recovery
When a background job fails — because of a timeout, a transient API error, or an unexpected data condition — the failure is logged with enough detail to diagnose the cause. Jobs can be retried when the underlying issue is resolved.
This resilience is especially important for integrations with external systems, where the external system may be temporarily unavailable.
Scheduled Jobs
Background jobs can also be scheduled to run on a recurring basis: sync exchange rates every morning, archive completed records every Sunday, generate weekly reports every Monday.
Scheduled jobs appear in the same registry with their last run time and next scheduled run.
The User Experience Impact
The impact of background jobs on user experience is often underappreciated. When heavy operations run synchronously — locking the interface, blocking navigation, forcing users to wait — the platform feels slow and fragile.
When they run in the background — acknowledged immediately, completing quietly, notifying when done — the platform feels fast and reliable. That perception matters enormously in daily use.