Basic storage routine works, basic file handling.

This commit is contained in:
James Cole
2018-05-10 09:10:16 +02:00
parent 116f7ed613
commit cabcb9c6d0
16 changed files with 278 additions and 157 deletions

View File

@@ -174,11 +174,11 @@ class JobStatusController extends Controller
public function store(ImportJob $importJob): JsonResponse
{
// catch impossible status:
$allowed = ['provider_finished', 'storing_data'];
$allowed = ['provider_finished', 'storing_data','error'];
if (null !== $importJob && !\in_array($importJob->status, $allowed, true)) {
Log::error('Job is not ready.');
return response()->json(['status' => 'NOK', 'message' => 'JobStatusController::start expects status "provider_finished".']);
return response()->json(['status' => 'NOK', 'message' => sprintf('JobStatusController::start expects status "provider_finished" instead of "%s".', $importJob->status)]);
}
// set job to be storing data: