Code Duplication    Length = 9-9 lines in 2 locations

packages/sync/src/modules/class-full-sync-immediately.php 1 location

@@ 332-340 (lines=9) @@
329
	 *
330
	 * @access public
331
	 */
332
	public function continue_sending() {
333
		if ( ! ( new Lock() )->attempt( self::LOCK_NAME ) || ! $this->is_started() || $this->get_status()['finished'] ) {
334
			return;
335
		}
336
337
		$this->send();
338
339
		( new Lock() )->remove( self::LOCK_NAME );
340
	}
341
342
	/**
343
	 * Immediately send the next items to full sync.

packages/sync/src/modules/class-full-sync.php 1 location

@@ 177-185 (lines=9) @@
174
	 *
175
	 * @param array $configs Full sync configuration for all sync modules.
176
	 */
177
	public function continue_enqueuing( $configs = null ) {
178
		if ( ! $this->is_started() || ! ( new Lock() )->attempt( self::ENQUEUE_LOCK_NAME ) || $this->get_status_option( 'queue_finished' ) ) {
179
			return;
180
		}
181
182
		$this->enqueue( $configs );
183
184
		( new Lock() )->remove( self::ENQUEUE_LOCK_NAME );
185
	}
186
187
	/**
188
	 * Get Modules that are configured to Full Sync and haven't finished enqueuing