For Staff

Job Monitoring

How to monitor background job execution, worker health, and task throughput.

5 min read

The Job Monitoring dashboard gives staff visibility into background task execution — email sending, trial processing, data syncing, and other async operations.

#Accessing Job Monitoring

Navigate to Admin Dashboard → Jobs. The page shows task statistics, throughput charts, and a filterable task list.

#Worker Health

A status pill in the top-right corner shows the current worker health:

  • Green "Worker Healthy" — the worker process is running and responsive
  • Red "Worker Unhealthy" — the worker is unreachable or has stopped processing

The health status polls every 30 seconds automatically. Hover over the pill to see the last heartbeat timestamp or error reason.

#Stats Cards

Four stat cards show task execution metrics for the selected time period:

CardDescription
Total ExecutedNumber of tasks that ran in the period
SuccessTasks that completed successfully
FailedTasks that failed (includes retry attempts)
Avg DurationAverage task execution time

#Period Selector

Use the period selector to change the stats window:

PeriodDescription
1hLast hour
6hLast 6 hours
24hLast 24 hours (default)
7dLast 7 days
30dLast 30 days

The period only affects the stats cards and throughput chart, not the task list.

#Throughput Chart

An area chart below the stats shows task execution over time with two series:

  • Success (green line with gradient fill) — successful task completions
  • Failed (red line with gradient fill) — failed task executions

Hover over any data point to see the exact counts for that time bucket.

#Task Name Breakdown

A table shows execution counts per task type (e.g., send_claim_verification_email, check_trial_reminders, process_trial_expirations, process_document). Each row shows the task name and its total execution count for the selected period.

#Task List

The bottom section shows a filterable, paginated list of individual task executions.

#Filters

FilterDescription
Task NameFree-text filter by task name
StatusFilter by status: All, Success, Failed, Running, Pending
From DateShow tasks on or after this date
To DateShow tasks on or before this date

Click Clear to reset all filters at once.

#Task Table

Each row shows:

ColumnBreakpointDescription
Task NameAlwaysThe task function name
StatusAlwaysSuccess, Failed, Running, or Pending badge
Durationsm+How long the task took to execute
Startedmd+Start timestamp
Finishedlg+Completion timestamp

Click any row to open the Task Detail Drawer.

#Task Detail Drawer

The detail drawer shows comprehensive information about a single task execution:

#Timing

  • Started at — when the task began
  • Finished at — when it completed
  • Duration — total execution time

#Labels

Key-value metadata associated with the task (e.g., event type, user ID, email address).

#Result

For successful tasks, the result JSON is displayed in a formatted code block.

#Error

For failed tasks, the error message and full traceback are shown in a scrollable code block. Use this to diagnose failures.

#Document AI Processing Pipeline

When an expert uploads a document (CV, certificate, etc.), the platform automatically extracts its text content and indexes it for attorney search. This pipeline runs as background tasks visible in Job Monitoring.

#Pipeline Steps

  1. process_document — Downloads the file from S3 (or local storage in dev), extracts plain text using pypdf (PDF) or python-docx (DOCX/DOC), and stores the extracted text on the expert_documents record.
  2. index_document_chunks — Aggregates extracted text from all of an expert's ready documents and re-indexes the expert in Elasticsearch, so the document content becomes searchable by attorneys.

#Document Processing Statuses

Each document in the expert_documents table tracks its processing state:

StatusMeaning
pendingUploaded but not yet picked up by the worker
processingCurrently being extracted
readyText extracted and indexed successfully
failedExtraction failed (unsupported format, corrupt file, or empty text)

#Troubleshooting

  • Failed extractions — filter the task list by process_document and status "Failed". Open the task detail drawer to see the error traceback. Common causes: corrupt PDF, password-protected file, or unsupported format.
  • Missing search results — if an expert's documents aren't appearing in search, check that their documents show processing_status = 'ready' and that index_document_chunks ran successfully after extraction.
  • Supported formats — PDF (.pdf), Word (.docx, .doc). Other formats are logged as unsupported and skipped.

#Pagination

The task list shows 50 items per page with Previous / Next controls.