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_importscapability. - 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:
| Counter | Meaning |
|---|---|
inserted | New vehicle posts created in WordPress (listings that did not previously exist locally) |
updated | Existing vehicle posts updated with changed listing data |
skipped | Listings that were fetched from the API but required no changes (hash match, no update needed) |
errors | Listings that could not be fetched or saved due to an API or database error |
sync_deleted | Vehicle posts deleted from WordPress because they no longer exist in the AutoScout24 listing (only when Full Sync is enabled) |
sync_kept | Vehicle posts retained during a Full Sync pass |
api_active | Number 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
- Open ADP Car Market Hub → Dashboard.
- 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
- The inventory trend and customer interest charts show historical activity over selected time periods.
- Dashboard data is cached for 3 minutes. Wait a short time after a manual import before checking.
Import & Limits tab
- Open ADP Car Market Hub → Import & Limits.
- The Last run row shows the timestamp of the most recent completed import.
- The Last run status row shows the counters from the most recent run: inserted, updated, skipped, errors.
- The Schedule row shows the current WP-Cron or server-cron configuration.
- Use the Trigger import now button to run an immediate import and observe the result.
Logs tab
- Open ADP Car Market Hub → Logs.
- 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.
- 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.`` - 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
- Open ADP Car Market Hub → System & Help.
- The Background Tasks table shows the import job hook (
as24ci_scheduled_import), its schedule, next run time, and current lock status. - 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
- Open ADP Car Market Hub → System & Help.
- 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
| Setting | Location | Purpose |
|---|---|---|
| Auto Import Enabled | Import & Limits tab | Enables or disables the scheduled WP-Cron import |
| Schedule | Import & Limits tab | hourly, every 6 hours, twice daily, daily, or custom interval |
| Max vehicles per run | Import & Limits tab | Limits inserted + updated vehicles per run (0 = unlimited) |
| Full Sync | Import & Limits tab | Delete local posts not found in the current remote listing |
| Verbose logging | Settings / Logs tab | Log a line for every vehicle and every image action |
| Seller IDs | Settings tab | Comma-separated list of AutoScout24 seller IDs to import |
Operational notes
- The import runner writes the last run timestamp to
as24ci_last_run_timeand the status counters toas24ci_last_run_statusin 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_activecounter 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_timevalue. - On WordPress multisite installations, each site in the network has its own Seller ID configuration and its own import history.
Troubleshooting
| Symptom | Likely cause | Check |
|---|---|---|
| Last run timestamp not updating | WP-Cron not firing | Check cron status in System & Help tab; consider server cron mode |
| High error count in run status | API credentials invalid, or network issue | Check Connectivity & API section in System & Help tab |
| Vehicles not appearing after import | Default post status is draft, or import succeeded but page cache is stale | Check default post status in Settings; purge any page cache |
| Skipped count unexpectedly high | No changes in listings since last import | Normal behavior; verify by checking the listing on AutoScout24 |
| Full sync deleting vehicles unexpectedly | Full Sync is enabled and vehicles were removed from the AutoScout24 account | Review Full Sync setting; confirm vehicle removal was intentional |
| Import lock stuck badge in System & Help tab | A previous import run did not release its lock | Lock will auto-clear after 40 minutes; use Run Import Now to force a new attempt |
| Errors logged for specific listing IDs | Temporary API error for that listing | Re-run the import; if the error persists, check the listing status in AutoScout24 |