fix(TaskProcessingA/Manager): Use time() along with rand int for file names

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2024-07-13 11:41:44 +02:00
parent eb0b5f29fb
commit 2fed2fc433

View file

@ -845,13 +845,13 @@ class Manager implements IManager {
}
if ($type->value < 10) {
/** @var SimpleFile $file */
$file = $folder->newFile((string) rand(0, 10000000), $output[$key]);
$file = $folder->newFile(time() . '-' . rand(1, 100000), $output[$key]);
$newOutput[$key] = $file->getId(); // polymorphic call to SimpleFile
} else {
$newOutput = [];
foreach ($output[$key] as $item) {
/** @var SimpleFile $file */
$file = $folder->newFile((string) rand(0, 10000000), $item);
$file = $folder->newFile(time() . '-' . rand(1, 100000), $item);
$newOutput[$key][] = $file->getId();
}
}