gomask executions
Monitor and manage routine executions
gomask executions
Monitor and manage routine executions.
Synopsis
gomask executions <subcommand> [OPTIONS]
Subcommands
| Command | Description |
|---|---|
list | List routine executions |
show | Display execution details |
logs | Show execution logs |
cancel | Cancel a running execution |
gomask executions list
List routine executions with filtering options.
Synopsis
gomask executions list [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--routine-id INT | integer | all | Filter by routine ID |
--status TEXT | string | all | Filter by status (pending, running, completed, failed, cancelled) |
--limit INT | integer | 20 | Maximum results |
--offset INT | integer | 0 | Pagination offset |
Status Values
| Status | Description |
|---|---|
pending | Queued, waiting to start |
running | Currently executing |
completed | Finished successfully |
failed | Error during execution |
cancelled | Manually cancelled |
Examples
# List all executions
gomask executions list
Output:
ID Routine Status Started Duration Records
──── ───────────────────── ────────── ─────────────────── ───────── ───────
801 customer-data-gen completed 2024-01-25 08:00:00 00:03:45 4,200
800 pii-masking-prod completed 2024-01-25 07:30:00 00:12:30 45,000
799 customer-data-gen failed 2024-01-24 16:00:00 00:01:22 1,250
798 test-data-staging completed 2024-01-24 14:00:00 00:02:15 3,100
797 customer-data-gen completed 2024-01-24 08:00:00 00:03:50 4,200
Showing 5 of 47 executions
# Filter by routine ID
gomask executions list --routine-id 123
# Filter by status
gomask executions list --status running
gomask executions list --status failed
# Combined filters
gomask executions list --routine-id 123 --status completed --limit 10
gomask executions show
Display detailed information about an execution.
Synopsis
gomask executions show EXECUTION_ID [OPTIONS]
Arguments
| Argument | Description |
|---|---|
EXECUTION_ID | The numeric execution ID |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--logs | flag | false | Include recent log entries |
Examples
gomask executions show 801
Output:
Execution ID: 801
───────────────────
Status: ✓ completed
Routine: customer-data-gen (ID: 123)
Type: SyntheticRoutine
Timing:
Started: 2024-01-25 08:00:00
Completed: 2024-01-25 08:03:45
Duration: 00:03:45
Progress:
┌─────────────────┬──────────┬──────────┬─────────────────┐
│ Table │ Records │ Status │ Duration │
├─────────────────┼──────────┼──────────┼─────────────────┤
│ users │ 500/500 │ ✓ done │ 00:00:45 │
│ products │ 200/200 │ ✓ done │ 00:00:30 │
│ orders │ 1000/1000│ ✓ done │ 00:01:15 │
│ order_items │ 2500/2500│ ✓ done │ 00:01:15 │
└─────────────────┴──────────┴──────────┴─────────────────┘
Summary:
Total Records: 4,200
Tables: 4
Throughput: 18.6 records/sec
Parameters:
record_count: 500
start_date: 2024-01-01
# Include logs
gomask executions show 801 --logs
Output includes:
Recent Logs:
[08:00:00] Starting execution 801
[08:00:01] Processing table: users (500 records)
[08:00:45] Completed: users (500 records in 44s)
[08:00:46] Processing table: products (200 records)
[08:01:16] Completed: products (200 records in 30s)
[08:01:17] Processing table: orders (1000 records)
...
[08:03:45] Execution completed successfully
Use 'gomask executions logs 801' for full logs.
Failed Execution
gomask executions show 799
Output:
Execution ID: 799
───────────────────
Status: ✗ failed
Routine: customer-data-gen (ID: 123)
Type: SyntheticRoutine
Timing:
Started: 2024-01-24 16:00:00
Failed: 2024-01-24 16:01:22
Duration: 00:01:22
Progress:
┌─────────────────┬──────────┬──────────┬─────────────────┐
│ Table │ Records │ Status │ Duration │
├─────────────────┼──────────┼──────────┼─────────────────┤
│ users │ 500/500 │ ✓ done │ 00:00:45 │
│ products │ 200/200 │ ✓ done │ 00:00:30 │
│ orders │ 550/1000 │ ✗ failed │ 00:00:07 │
│ order_items │ 0/2500 │ - skipped│ - │
└─────────────────┴──────────┴──────────┴─────────────────┘
Error:
Table: orders
Message: Foreign key constraint violation
Details: Key (user_id)=(501) is not present in table "users"
Troubleshooting:
- Check foreign key references
- Verify parent table has required records
- Review hierarchy_level settings
Use 'gomask executions logs 799' for detailed logs.
gomask executions logs
View execution logs.
Synopsis
gomask executions logs EXECUTION_ID [OPTIONS]
Arguments
| Argument | Description |
|---|---|
EXECUTION_ID | The numeric execution ID |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--follow, -f | flag | false | Follow logs in real-time (for running executions) |
Examples
# View recent logs
gomask executions logs 801
Output:
[2024-01-25 08:00:00] INFO Starting execution 801
[2024-01-25 08:00:00] INFO Routine: customer-data-gen
[2024-01-25 08:00:00] INFO Parameters: record_count=500, start_date=2024-01-01
[2024-01-25 08:00:01] INFO Processing table: users
[2024-01-25 08:00:01] DEBUG Generating 500 records with 12 columns
[2024-01-25 08:00:15] DEBUG Batch 1/5 completed (100 records)
[2024-01-25 08:00:30] DEBUG Batch 2/5 completed (100 records)
[2024-01-25 08:00:45] INFO Completed: users (500 records in 44s)
...
[2024-01-25 08:03:45] INFO Execution completed successfully
[2024-01-25 08:03:45] INFO Total records: 4,200
[2024-01-25 08:03:45] INFO Duration: 3m 45s
# Follow logs in real-time
gomask executions logs 802 --follow
gomask executions cancel
Cancel a running execution.
Synopsis
gomask executions cancel EXECUTION_ID
Arguments
| Argument | Description |
|---|---|
EXECUTION_ID | The numeric execution ID |
Examples
gomask executions cancel 802
Output:
Cancelling execution 802...
✓ Execution cancelled
Execution was in progress on table 'orders' (350/1000 records).
Partial data may have been written to the database.
Cleanup options:
- Delete partial data manually
- Re-run with fresh data
Cancel Confirmation
For executions with significant progress:
gomask executions cancel 802
Output:
Execution 802 is 75% complete.
Cancelling will stop at the current point.
Are you sure you want to cancel? [y/N]: y
✓ Execution cancelled
Cannot Cancel Completed
gomask executions cancel 801
Output:
Error: Cannot cancel execution 801
Status: completed
Only pending or running executions can be cancelled.
Exit Codes
| Code | Description |
|---|---|
| 0 | Command completed successfully |
| 1 | Error (not found, cannot cancel, etc.) |
Monitoring Long-Running Executions
Real-Time Monitoring
# Start with watch
gomask run routine.yaml --watch
# Or monitor existing execution
gomask executions logs 802 --follow
Periodic Status Check
# Check status
gomask executions show 802
# Quick status only
gomask executions list --status running