packages/sync/src/modules/class-full-sync.php 1 location
|
@@ 178-186 (lines=9) @@
|
175 |
|
* |
176 |
|
* @param array $configs Full sync configuration for all sync modules. |
177 |
|
*/ |
178 |
|
public function continue_enqueuing( $configs = null ) { |
179 |
|
if ( ! $this->is_started() || ! ( new Lock() )->attempt( self::ENQUEUE_LOCK_NAME ) || $this->get_status_option( 'queue_finished' ) ) { |
180 |
|
return; |
181 |
|
} |
182 |
|
|
183 |
|
$this->enqueue( $configs ); |
184 |
|
|
185 |
|
( new Lock() )->remove( self::ENQUEUE_LOCK_NAME ); |
186 |
|
} |
187 |
|
|
188 |
|
/** |
189 |
|
* Get Modules that are configured to Full Sync and haven't finished enqueuing |
packages/sync/src/modules/class-full-sync-immediately.php 1 location
|
@@ 300-308 (lines=9) @@
|
297 |
|
* |
298 |
|
* @access public |
299 |
|
*/ |
300 |
|
public function continue_sending() { |
301 |
|
if ( ! ( new Lock() )->attempt( self::LOCK_NAME ) || ! $this->is_started() || $this->get_status()['finished'] ) { |
302 |
|
return; |
303 |
|
} |
304 |
|
|
305 |
|
$this->send(); |
306 |
|
|
307 |
|
( new Lock() )->remove( self::LOCK_NAME ); |
308 |
|
} |
309 |
|
|
310 |
|
/** |
311 |
|
* Immediately send the next items to full sync. |