The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Document background task and run statuses (#80578)
Krishnaf1df1432c53
diff --git a/docs/monitor/background-tasks.md b/docs/monitor/background-tasks.mdindex 7b5f59c9779..b3866e14fb5 100644--- a/docs/monitor/background-tasks.md+++ b/docs/monitor/background-tasks.md@@ -27,10 +27,19 @@ The Tasks tab lists the individual steps Metabase performs to complete a run. Fo- **Started at**: The timestamp for when the task started.- **Ended at**: The timestamp for when the task finished.- **Duration (ms)**: The duration of the task in milliseconds.-- **Status**: Whether the task succeeded, failed, or is still in progress.+- **Status**: The outcome of the task. See [Task statuses](#task-statuses).Use the **Filter by task** dropdown to view a single task type, and the **Filter by status** dropdown to view tasks with a specific status.+### Task statuses++A task has one of four statuses:++- **Started**: The task is running. Metabase records this status when the task begins.+- **Success**: The task finished without raising an error.+- **Failed**: The task raised an error. The [task details](#task-details) record the exception class, its message, the stack trace, and any additional error data.+- **Unknown**: The task never reported an outcome. Metabase applies this status when the [run](#runs) the task belongs to is abandoned, so the task's real result is unrecoverable. See [Abandoned runs](#abandoned-runs).+### Task detailsClick a task to view more information about it, including the task's ID and a link to the run it belongs to.@@ -47,11 +56,33 @@ The Runs tab lists each operation Metabase performs. For each run, Metabase show- **Entity**: The item the run involves, like a question for an alert or a database for a sync.- **Started at**: The timestamp for when the run started.- **Ended at**: The timestamp for when the run finished.-- **Status**: Whether the run succeeded, failed, is still in progress, or was abandoned.+- **Status**: The outcome of the run. See [Run statuses](#run-statuses).- **Task Count**: The number of tasks in the run, including a breakdown of how many succeeded and failed.Use the **Filter by run type**, **Filter by started at**, **Filter by entity**, and **Filter by status** dropdowns to narrow the list.+### Run statuses++A run has one of four statuses:++- **Started**: The run is in progress.+- **Success**: Every task in the run succeeded.+- **Failed**: At least one task in the run didn't succeed. A run is only marked successful when all of its tasks succeed, so a run containing a failed or unknown task is marked failed even if the rest of its tasks succeeded.+- **Abandoned**: Metabase stopped hearing from the run before it finished. See [Abandoned runs](#abandoned-runs).++### Abandoned runs++While a run is in progress, the Metabase process working on it reports that it's still alive. If those reports stop, the run would otherwise sit in the Started status forever, so Metabase periodically looks for runs that have gone quiet and marks them **Abandoned**.++Metabase abandons a run when either:++- It hasn't reported in for more than an hour, which usually means the process running it stopped or lost its connection to the application database.+- It has been running for more than 24 hours, whether or not it's still reporting in.++When Metabase abandons a run, any of that run's tasks still in the Started status are marked [Unknown](#task-statuses), because there's no way to tell whether they finished.++Abandoned runs and unknown tasks aren't errors that a task itself reported, so the [task details](#task-details) won't contain a stack trace. Check your [application logs](./application-logs.md) around the run's start time instead.+### Run detailsClick a run to view more information about it, including the run's ID, its entity type, and a link to the entity it involves.