Better catch TIC file exceptions, enable moving TIC files if fido.packet_keep is defined

This commit is contained in:
2023-10-04 22:22:01 +11:00
parent ce7a96ca2a
commit b854cf9fe0
4 changed files with 39 additions and 11 deletions

View File

@@ -58,6 +58,7 @@ class PacketProcess implements ShouldQueue
$fs = Storage::disk(config('fido.local_disk'));
// @todo Catch files that we cannot process, eg: ARJ bundles.
try {
$f = new File($this->file->full_name);
$processed = FALSE;
@@ -131,8 +132,7 @@ class PacketProcess implements ShouldQueue
} else {
// If we want to keep the packet, we could do that logic here
if (config('fido.packet_keep')) {
$now = Carbon::now()->format('Ymd');
$dir = sprintf('%s/%s',config('fido.dir'),$now);
$dir = sprintf('%s/%s',config('fido.dir'),Carbon::now()->format('Ymd'));
Log::debug(sprintf('%s:- Moving processed packet [%s] to [%s]',self::LOGKEY,$this->file->rel_name,$dir));
try {