Task_Manager::run_next( string $state )

Summary

Run the next task in the queue


Parameters

$state

(string) (Required)


Return

(bool)


Source

File: src/BigCommerce/Import/Task_Manager.php

	public function run_next( $state ) {
		try {
			$task     = $this->get_task( $state );
			$callback = $task->get_callback();
			do_action( 'bigcommerce/log', Error_Log::INFO, __( 'Running import task', 'bigcommerce' ), [
				'state'       => $state,
				'description' => $task->get_description(),
			] );
			$callback( $state );

			return true;
		} catch ( No_Task_Found_Exception $e ) {
			do_action( 'bigcommerce/log', Error_Log::NOTICE, __( 'No handler found for current import state', 'bigcommerce' ), [
				'state'     => $state,
			] );
			do_action( 'bigcommerce/log', Error_Log::DEBUG, $e->getTraceAsString(), [] );

			return false;
		}
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.