Add verbose mode, progress indicators, and missing media log
- Add --verbose flag to sync commands for detailed API request/response output - Add progress indicators (.=#xPpE|) for compact sync output - Implement exponential backoff (1s, 2s, 4s, 8s, 16s) for media downloads - Log failed media downloads to wp-content/uploads/mls-missing-media.log - Add 'wp mls cache missing' command to view/clear the log - Retry on rate limit (429) and server errors (5xx) - Update documentation with new features Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,10 +61,10 @@ wp mls test auth
|
||||
wp mls status
|
||||
wp mls status rate-limits
|
||||
|
||||
# Run sync
|
||||
wp mls sync full [--dry-run] [--limit=N]
|
||||
wp mls sync incremental [--dry-run]
|
||||
wp mls sync media [--limit=N]
|
||||
# Run sync (use --verbose for detailed output)
|
||||
wp mls sync full [--dry-run] [--limit=N] [--verbose]
|
||||
wp mls sync incremental [--dry-run] [--verbose]
|
||||
wp mls sync media [--limit=N] [--verbose]
|
||||
wp mls sync resume --id=<sync_id>
|
||||
|
||||
# Statistics
|
||||
@@ -73,8 +73,33 @@ wp mls stats
|
||||
# Cache management
|
||||
wp mls cache clear --confirm
|
||||
wp mls cache cleanup
|
||||
wp mls cache missing # View failed media downloads
|
||||
wp mls cache missing --limit=20 # View first 20 entries
|
||||
wp mls cache missing --clear # Clear the log
|
||||
```
|
||||
|
||||
### Progress Output
|
||||
|
||||
Without --verbose (compact mode):
|
||||
- `.` = new property created
|
||||
- `#` = property updated
|
||||
- `x` = property deleted
|
||||
- `-` = skipped (dry-run)
|
||||
- `P` = photo downloaded
|
||||
- `p` = photo skipped (already exists)
|
||||
- `E` = photo error
|
||||
- `|` = page complete
|
||||
|
||||
With --verbose: Full timestamped output showing API requests, responses, and individual item status.
|
||||
|
||||
### Missing Media Log
|
||||
|
||||
Failed media downloads are logged to: `wp-content/uploads/mls-missing-media.log`
|
||||
|
||||
Format: `[timestamp] listing_key | media_key | error | url`
|
||||
|
||||
Media downloads use exponential backoff (1s, 2s, 4s, 8s, 16s) for rate limit (429) and server errors (5xx).
|
||||
|
||||
### Public API Functions
|
||||
|
||||
Available for themes/plugins:
|
||||
|
||||
Reference in New Issue
Block a user