| @@ -69,9 +69,9 @@ | ||
| 69 | 69 | /** |
| 70 | 70 | * Starts the sync process. |
| 71 | 71 | * |
| 72 | 72 | */ |
| 73 | - public function start( $action ) { | |
| 73 | + public function start( $action, $options = [] ) { | |
| 74 | 74 | $action_class = $this->get_class_by_action($action); |
| 75 | 75 | |
| 76 | 76 | if($action_class) { |
| 77 | 77 | // BGRunner's lock is per-type — nothing else stops two different actions from running at once. |
| @@ -83,9 +83,9 @@ | ||
| 83 | 83 | 'message' => sprintf(__('Another sync (%s) is currently running. Stop or finish it before starting a new one.', 'media-cloud-sync'), $blocking_action), |
| 84 | 84 | ]; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - $start_result = $action_class->start(); | |
| 87 | + $start_result = $action_class->start( $options ); | |
| 88 | 88 | // A job's start() can signal a precondition failure (e.g. no destination |
| 89 | 89 | // configured) by returning ['success' => false, ...] instead of the usual |
| 90 | 90 | // void/true — short-circuit and pass that straight through instead of masking |
| 91 | 91 | // it with a status object that always reads as started. |