Better feedback.

This commit is contained in:
James Cole 2014-09-11 15:19:07 +02:00
parent 3290ce85a9
commit c8dd935460

View File

@ -30,7 +30,15 @@ class MigrateController extends BaseController
// so now Firefly pushes something in a queue and does something with it! Yay! // so now Firefly pushes something in a queue and does something with it! Yay!
\Log::debug('Pushed a job to start the import.'); \Log::debug('Pushed a job to start the import.');
Queue::push('Firefly\Queue\Import@start', ['file' => $fullName, 'user' => \Auth::user()->id]); Queue::push('Firefly\Queue\Import@start', ['file' => $fullName, 'user' => \Auth::user()->id]);
Session::flash('success', 'The import job has been queued. Please be patient. Data will appear'); if (Config::get('queue.default') == 'sync') {
Session::flash('success', 'Your data has been imported!');
} else {
Session::flash(
'success',
'The import job has been queued. Please be patient. Data will appear slowly. Please be patient.'
);
}
return Redirect::route('index'); return Redirect::route('index');
} }
Session::flash('error', 'Could not save file to storage.'); Session::flash('error', 'Could not save file to storage.');