Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI Command for Bulk Sync #9

Open
kevinfodness opened this issue Jul 23, 2024 · 0 comments
Open

Add CLI Command for Bulk Sync #9

kevinfodness opened this issue Jul 23, 2024 · 0 comments
Labels
enhancement New feature or request php Requires understanding PHP

Comments

@kevinfodness
Copy link
Member

kevinfodness commented Jul 23, 2024

Description

By default, the page size is 100, which is fine for cron, but will take a long time to execute for a large number of videos if run hourly (the default). We should have a CLI option to sync all videos with a larger batch size (can be set per adapter, JW Player is 10,000, for example).

Use Case

When setting up this functionality initially, it would be good to have a method for importing videos in bulk.

Acceptance Criteria

  • When a new instance of Sync_Manager is initialized, also register a CLI command for bulk indexing videos using the provided adapter and callback.
  • Allow the bulk size parameter to be overridden via a CLI argument, similar to how we have done it for SearchPress. By default, it will use the same bulk size that was provided when the sync manager was initialized, but CLI users can override it with a different value, e.g., wp video-sync sync --batch_size=10000
@kevinfodness kevinfodness added enhancement New feature or request php Requires understanding PHP labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request php Requires understanding PHP
Projects
None yet
Development

No branches or pull requests

1 participant