mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -06:00
Better cleanup routine.
This commit is contained in:
parent
dd361bb9ad
commit
f300287814
@ -48,6 +48,8 @@ class ExportController extends Controller
|
||||
$name = 'Export job on ' . $date . '.zip';
|
||||
$quoted = sprintf('"%s"', addcslashes($name, '"\\'));
|
||||
|
||||
$job->change('export_downloaded');
|
||||
|
||||
|
||||
return response(file_get_contents($file), 200)
|
||||
->header('Content-Description', 'File Transfer')
|
||||
|
@ -29,8 +29,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
|
||||
{
|
||||
$dayAgo = Carbon::create()->subDay();
|
||||
ExportJob::where('created_at', '<', $dayAgo->format('Y-m-d H:i:s'))
|
||||
->where('status', 'never_started')
|
||||
// TODO also delete others.
|
||||
->whereIn('status', ['never_started', 'export_status_finished', 'export_downloaded'])
|
||||
->delete();
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user