PHP Class Jetpack_Sync_Module_Full_Sync, jetpack
This class, and its related class Jetpack_Sync_Module, contain a few non-obvious optimisations that should be explained:
- we fire an action called jetpack_full_sync_start so that WPCOM can erase the contents of the cached database
- for each object type, we page through the object IDs and enqueue them by firing some monitored actions
- we load the full objects for those IDs in chunks of Jetpack_Sync_Module::ARRAY_CHUNK_SIZE (to reduce the number of MySQL calls)
- we fire a trigger for the entire array which the Jetpack_Sync_Listener then serializes and queues.
ファイルを表示
Open project: automattic/jetpack
Public Methods
Private Methods
Method Details
clear_status()
public method
continue_enqueuing()
public method
get_action_name()
public method
get_status()
public method
init_before_send()
public method
init_full_sync_listeners()
public method
is_finished()
public method
is_started()
public method
reset_data()
public method
public start ( $module_configs = null ) |
update_sent_progress_action()
public method