clock->now(); $this->scan_links->recheck_unconfirmed(); $unfinished = $this->scan_links->unfinished_total( (int) $state->started_at, $now ); if ( 0 < $unfinished ) { return; } $finished_state = $this->transitions->finished( $state, $now ); $this->scan_state_store->save( $finished_state ); $this->data_version->bump(); } }