Skip to main content
Version: 1.0.0-beta

Data Refresh Jobs

Data Refresh Jobs represent individual sync operations executed manually or automatically by the AIIA scheduler to pull fresh records from configured connectors.

Every time a connector runs, a Data Refresh Job (JobRun) is instantiated to track the execution steps, record counts, execution duration, and log any database or API connection errors.


Sync Execution Flow

The sync process is executed asynchronously via background workers (Redis + Worker service):


Monitoring Job Runs

Administrators can monitor the status of all data refresh activities in the Admin → Connectors → Job History section.

Job Statuses

Refresh jobs cycle through the standard execution statuses:

Status BadgeDescriptionRequired Action
PendingJob is queued in Redis, waiting for an available background worker slot.None. Usually transitions in < 5 seconds.
RunningThe worker is actively fetching and processing data from the external source.None. You can monitor the live record count.
CompletedJob finished successfully; raw data was parsed, matched, and committed.None. Displays total ingested records.
FailedA network, authentication, or protocol failure blocked the run.Check credential configuration, verify firewall ports, and click Retry.
ErrorConnection succeeded, but data validation failed (e.g., mismatching column type).Inspect the exception traceback, correct mappings, and re-run.
CancelledThe job was terminated manually by an administrator during execution.Re-dispatch if needed.

Manual Execution vs. Scheduled Runs

Scheduled Syncs

If a connector is configured with a CRON schedule, the scheduler daemon automatically pushes a new job to the worker queue at the specified interval.

  • Example: 0 2 * * * (Runs every night at 2:00 AM, pulling transaction data from SAP).

Triggering Manual Syncs

To force an immediate sync (e.g., after updating database credentials or during an active audit field investigation):

  1. Navigate to Admin → Connectors.
  2. Locate the target connector in the list.
  3. Click the Sync Now (sync) icon button.
  4. The system will queue a job, and the status badge will transition to PendingRunning.

Log Analysis & Troubleshooting

For every failed or error-state job, AIIA provides a detailed log log viewer:

[2026-05-24 02:00:03] INFO: Starting data refresh job run #14802 (SAP ERP DB)
[2026-05-24 02:00:04] INFO: Connecting to postgresql://sap_read@10.140.2.14:5432/production...
[2026-05-24 02:00:25] ERROR: Connection timeout. Unable to reach 10.140.2.14:5432 after 20 seconds.
[2026-05-24 02:00:25] FATAL: Job aborted with state FAILED.

Common Failures & Resolutions

IssueRoot CauseResolution
Connection TimeoutFirewall blocking traffic between AIIA worker and target system.Allow outbound connections from AIIA worker IP to target host/port.
Invalid CredentialsCredentials changed on target database or expired S3 access keys.Update configuration settings in the connector and run a Connection Test.
Column MismatchSchema migration on the external DB changed expected types or names.Update the connector mappings or adjust the custom SQL query configured.
Out of Memory (OOM)Target query returned too many rows without chunking.Optimize the custom SQL query or configure partition limits.