Skip to content

Jobs

ReArch uses a background job queue (BullMQ backed by Redis) to handle asynchronous operations. The Jobs dashboard provides visibility into active, completed, and failed jobs.

QueueJob TypeDescription
conversationsContainer setupProvisions a Docker container when a conversation is created. Clones the repo, starts services, and connects the agent.
conversationsContainer teardownStops and removes a container when a conversation is deleted.
resourcesImage buildBuilds a Docker image from a repository’s template or custom .rearch/ folder.

Navigate to Administration > Jobs to see the job dashboard. Jobs are displayed with:

ColumnDescription
IDUnique job identifier.
TypeThe job type (e.g., container setup, image build).
Statusactive, completed, failed, waiting, or delayed.
ProgressA percentage indicator for long-running jobs.
CreatedWhen the job was enqueued.
DurationHow long the job took (or has been running).

When a job fails, it is marked with a failed status and the error message is available in the job details. Common failure causes:

FailureLikely Cause
Container setup failsDocker daemon unreachable, image not found, insufficient disk space, or network issues.
Image build failsDockerfile syntax error, missing dependencies, or repository access issues.
Container teardown failsContainer was already removed manually.

Failed jobs can be retried from the dashboard.

In addition to user-triggered jobs, ReArch runs periodic scheduled tasks:

TaskIntervalDescription
Idle container cleanupConfigurableStops conversation containers that have been inactive beyond a threshold. Frees up resources on the host.
Scheduled image rebuildsConfigurableRebuilds Docker images for repositories that have automatic rebuild enabled, keeping images up to date with the latest branch state.

Scheduled tasks are managed by the BullMQ scheduler and do not appear in the Jobs dashboard unless they create child jobs (e.g., a scheduled rebuild creates an image build job).