Skip to content

Activity & Tasks

Every instance has an Activity tab that shows its audit trail: state changes, power actions, networking, storage, backups and settings changes.

Instance activity

Activity

  • Scoped to the requesting user's resources; a customer never sees another tenant's activity.
  • Console activity records connection events only (never terminal content, keys or screens).
  • Sensitive operations (password regeneration, rebuild, delete) are recorded.

Tasks

Every asynchronous mutation that touches a hypervisor is a durable task row driven by the task engine.

Lifecycle

queued → dispatched → running → completed
                             ↘ failed / timed_out
        cancelled (pending|queued only)
  • queued → dispatched is an atomic claim (oldest task for the hypervisor).
  • running → running reports progress (0–100) and a current step.
  • Terminal states: completed, failed, cancelled, timed_out.

Idempotency

At-least-once delivery is assumed. Terminal calls are safe to repeat; a claimed task is invisible to later claimants; (task_id, sequence) is unique so a double-fire trips the constraint instead of double-recording.

Timeouts

Each task gets a timeout at creation (per-type, configurable). A stale-task sweep runs every 5 minutes and marks over-budget tasks timed_out, applying the same unwind as a failure. The sweep never touches instance liveness.

Task events

An append-only per-task timeline powers the UI progress ladder and audit views: queued, dispatched, agent_received, started, progress, step, completed, failed, timed_out.

Admin views

Tasks

php artisan pterocloud:tasks:stale
php artisan pterocloud:instance:inspect <uuid>