Skip to content

Commit

Permalink
move create_action_to_send
Browse files Browse the repository at this point in the history
  • Loading branch information
lezama committed Nov 11, 2019
1 parent 676054c commit bcaac91
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
21 changes: 21 additions & 0 deletions packages/sync/src/class-sender.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,27 @@ public function send_action( $action_name, $data ) {
return $processed_item_ids;
}

/**
* Create an synthetic action for direct sending to WPCOM during full sync (for example)
*
* @access protected
*
* @param string $action_name The action.
* @param array $data The data associated with the action.
* @return array An array of synthetic sync actions keyed by current microtime(true)
*/
private function create_action_to_send( $action_name, $data ) {
return [
microtime( true ) => [
$action_name,
$data,
get_current_user_id(),
microtime( true ),
Settings::is_importing(),
],
];
}

/**
* Returns any object that is able to be synced.
*
Expand Down
21 changes: 0 additions & 21 deletions packages/sync/src/modules/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,27 +341,6 @@ public function send_action( $action_name, $data ) {
return $sender->send_action( $action_name, $data );
}

/**
* Create an synthetic action for direct sending to WPCOM during full sync (for example)
*
* @access protected
*
* @param string $action_name The action.
* @param array $data The data associated with the action.
* @return array An array of synthetic sync actions keyed by current microtime(true)
*/
private function create_action_to_send( $action_name, $data ) {
return [
microtime( true ) => [
$action_name,
$data,
get_current_user_id(),
microtime( true ),
Settings::is_importing(),
],
];
}

/**
* Retrieve chunk IDs with previous interval end.
*
Expand Down

0 comments on commit bcaac91

Please sign in to comment.