Documentation · Operations and Maintenance

Import Monitoring

This document explains how to monitor the vehicle import pipeline in the ADP Car Market Hub plugin, including how to read import run results, understand the status counters, and identify and respond to import failures.

When to use this document

Read this document if you are a site administrator or technical operator who needs to confirm that scheduled or manual imports are running correctly, understand what the import counters mean, or investigate why vehicles are not appearing or updating as expected.

Overview

Every time the import pipeline runs — whether triggered by WP-Cron, the REST cron endpoint, or the Run Import Now button — the plugin records the result in the WordPress options table and writes a summary to the log file. This information is surfaced in the Dashboard tab (KPI row and recent activity), the Automation tab (last run time and status), and the Logs tab (per-vehicle detail when verbose logging is on).

Requirements

  • Administrator account with the manage_as24_imports capability.
  • The AutoScout24 API credentials and at least one Seller ID configured under ADP Car Market Hub → Settings.
  • Automatic import enabled or a manual import triggered.

Import run status counters

After each import run the plugin records the following counters:

CounterMeaning
insertedNew vehicle posts created in WordPress (listings that did not previously exist locally)
updatedExisting vehicle posts updated with changed listing data
skippedListings that were fetched from the API but required no changes (hash match, no update needed)
errorsListings that could not be fetched or saved due to an API or database error
sync_deletedVehicle posts deleted from WordPress because they no longer exist in the AutoScout24 listing (only when Full Sync is enabled)
sync_keptVehicle posts retained during a Full Sync pass
api_activeNumber of activated and live listings returned by the API for the seller (useful for comparing against the expected catalogue size)

A healthy import run on a stable catalogue will typically show a high skipped count and low or zero inserted, updated, and errors. If listings have changed, updated will increase accordingly.

Viewing import status in the admin

Dashboard tab

  1. Open ADP Car Market Hub → Dashboard.
  2. The KPI row shows: - Total imported vehicles (published and draft) - New vehicles added in the last 7 days - The timestamp of the most recent import run
  3. The inventory trend and customer interest charts show historical activity over selected time periods.
  4. Dashboard data is cached for 3 minutes. Wait a short time after a manual import before checking.

Import & Limits tab

  1. Open ADP Car Market Hub → Import & Limits.
  2. The Last run row shows the timestamp of the most recent completed import.
  3. The Last run status row shows the counters from the most recent run: inserted, updated, skipped, errors.
  4. The Schedule row shows the current WP-Cron or server-cron configuration.
  5. Use the Trigger import now button to run an immediate import and observe the result.

Logs tab

  1. Open ADP Car Market Hub → Logs.
  2. The Recent Errors and Recent Warnings panels show the last 50 error or warning entries from the log, scanning the most recent 2,000 lines.
  3. With verbose logging enabled, the Log Viewer shows a line for each vehicle processed: `` [INFO] Import vehicle {listing_id} (seller {seller_id}) begin. [INFO] Import vehicle {listing_id} result=updated. ``
  4. A completed import run produces a summary line: `` [INFO] Import runner (wp-cron) finished: inserted=X updated=X skipped=X errors=X ``

System & Help tab — Background Tasks

  1. Open ADP Car Market Hub → System & Help.
  2. The Background Tasks table shows the import job hook (as24ci_scheduled_import), its schedule, next run time, and current lock status.
  3. Status badges indicate: - Scheduled (green) — the import event is queued in WP-Cron - Running (amber) — the import lock is currently held - Lock stuck (red) — a stale lock was detected; it will be automatically cleared on the next run attempt - Not scheduled (amber) — the import cron event is not registered; check the automation settings - Handled by server cron (green) — server cron mode is active

Understanding the import lock

The plugin uses a transient lock (as24ci_cron_import_running) to prevent overlapping import runs. The lock stores the Unix timestamp of when the run started and expires after 40 minutes.

If an import run starts while the lock is held and the lock is not stale, the new run is skipped and the following message is written to the log:

[INFO] Import runner (wp-cron): already in progress, skipping.

If the lock is older than 40 minutes (indicating the previous run died without releasing it), the lock is automatically cleared and a new run proceeds:

[INFO] Import runner (wp-cron): stale lock detected (age=Xs), clearing and proceeding.

You do not need to clear this lock manually in normal operation.

Max vehicles per run

When the Max vehicles per run setting is configured to a non-zero value, the import runner stops after processing that many inserted or updated vehicles. Skipped vehicles (those with no changes) do not count toward this limit. When the limit is reached, the log records:

[INFO] Import runner (wp-cron): vehicle limit (N) reached, stopping. inserted=X updated=X skipped=X errors=X

The next scheduled run will continue with the remaining listings. This setting is intended for environments with strict execution time constraints.

Full sync monitoring

When Full Sync is enabled, the import runner performs an additional pass after the regular import: it compares all locally imported vehicle post IDs against the set of active listing IDs returned by the API, and permanently deletes any local posts whose listing IDs are no longer present.

The full sync result is logged:

[INFO] Full sync completed: kept=X deleted=X.

Caution: Full sync will not run if the vehicle limit was reached during the import, because the remote listing set may be incomplete. This is a safety guard to prevent accidental mass deletion when the API returned a partial result.

Full sync is skipped (with a log notice) if the remote listing set is empty.

Monitoring API connectivity

  1. Open ADP Car Market Hub → System & Help.
  2. The Connectivity & API card shows: - Whether the API base URL is configured and reachable (HTTP response code and latency) - Whether a valid OAuth token is cached and its expiry time - Whether the REST cron endpoint is reachable (if a cron token has been configured) - Whether the Market Hub API is reachable

If the API is unreachable during an import, errors are logged per listing and counted in the errors counter.

Configuration reference

SettingLocationPurpose
Auto Import EnabledImport & Limits tabEnables or disables the scheduled WP-Cron import
ScheduleImport & Limits tabhourly, every 6 hours, twice daily, daily, or custom interval
Max vehicles per runImport & Limits tabLimits inserted + updated vehicles per run (0 = unlimited)
Full SyncImport & Limits tabDelete local posts not found in the current remote listing
Verbose loggingSettings / Logs tabLog a line for every vehicle and every image action
Seller IDsSettings tabComma-separated list of AutoScout24 seller IDs to import

Operational notes

  • The import runner writes the last run timestamp to as24ci_last_run_time and the status counters to as24ci_last_run_status in the WordPress options table after every run.
  • The Dashboard tab reads from a transient cache with a 3-minute TTL. Immediately after a manual import, the displayed counts may not yet reflect the latest run.
  • The api_active counter reflects the number of listings that passed the plugin's client-side filter (status = activated, live = true). This number may be lower than the raw total reported by the API because the plugin filters out inactive and non-live listings before importing.
  • The plugin attempts to raise the PHP execution time limit to 300 seconds at the start of each WP-Cron or REST-triggered import. If your hosting environment does not permit this, imports of large catalogues may time out. The System & Help tab shows a badge for the current max_execution_time value.
  • On WordPress multisite installations, each site in the network has its own Seller ID configuration and its own import history.

Troubleshooting

SymptomLikely causeCheck
Last run timestamp not updatingWP-Cron not firingCheck cron status in System & Help tab; consider server cron mode
High error count in run statusAPI credentials invalid, or network issueCheck Connectivity & API section in System & Help tab
Vehicles not appearing after importDefault post status is draft, or import succeeded but page cache is staleCheck default post status in Settings; purge any page cache
Skipped count unexpectedly highNo changes in listings since last importNormal behavior; verify by checking the listing on AutoScout24
Full sync deleting vehicles unexpectedlyFull Sync is enabled and vehicles were removed from the AutoScout24 accountReview Full Sync setting; confirm vehicle removal was intentional
Import lock stuck badge in System & Help tabA previous import run did not release its lockLock will auto-clear after 40 minutes; use Run Import Now to force a new attempt
Errors logged for specific listing IDsTemporary API error for that listingRe-run the import; if the error persists, check the listing status in AutoScout24