Skip to content

Add CLI Command for Bulk Sync #9

@kevinfodness

Description

@kevinfodness

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphpRequires understanding PHP

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions