Submit derive task after all uploads completed
This commit is contained in:
@@ -64,6 +64,29 @@ class ArchiveJob extends Job {
|
||||
$doc->save();
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
$this->status("Waiting for bucket creation");
|
||||
$done = 0;
|
||||
while ($done == 0) {
|
||||
sleep(1);
|
||||
$md = Archive::metadata($id);
|
||||
if (property_exists($md, "created")) {
|
||||
$done = 1;
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$this->fail($e->getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Archive::derive($id);
|
||||
} catch (Exception $e) {
|
||||
$this->fail($e->getMessage());
|
||||
return;
|
||||
}
|
||||
|
||||
$this->finish();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user