Files
2026-04-28 21:14:25 +03:00

74 lines
1.8 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace App\Services\LineListTriggers\Triggers;
use App\Services\LineListTriggers\Base\BaseLineListTrigger;
use Illuminate\Support\Facades\Log;
/**
* Cleanup Operations Trigger
*
* Non-critical cleanup operations at the end
* Deletes orphaned paint follow up records
*/
class CleanupOperationsTrigger extends BaseLineListTrigger
{
public function getName(): string
{
return 'Cleanup Operations';
}
public function getDependentFields(): array
{
return ['line_no', 'painting_cycle'];
}
protected function process($lineListData, $beforeData, array $context): array
{
/*
try {
// Clean-up operation - delete no paint followup
view('cron.delete-no-paint-followup', [
'lineNumber' => $lineListData->line_no
])->render();
Log::debug("Cleanup operations completed", [
'line_no' => $lineListData->line_no
]);
Log::debug("Cleanup operations completed", [
'line_no' => $lineListData->line_no,
'before_painting_cycle' => $beforeData->painting_cycle
]);
return [
'success' => true,
'executed' => 'cleanup_view'
];
} catch (\Exception $cleanupException) {
Log::warning("Clean-up işlemi başarısız oldu: " . $cleanupException->getMessage(), [
'line_number' => $lineListData->line_no
]);
// Non-critical, don't throw
return [
'success' => false,
'error' => $cleanupException->getMessage(),
'note' => 'non_critical'
];
}
*/
}
}