mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 06:34:35 -04:00
Refactor for backup update console command
This commit is contained in:
parent
ec374eec63
commit
86c43c58b9
@ -77,10 +77,10 @@ class BackupUpdate extends Command
|
|||||||
{
|
{
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
Backup::whereRaw('html_backup != "" OR html_backup IS NOT NULL')->chunk(5000, function ($backups) {
|
Backup::whereRaw('html_backup IS NOT NULL')->chunk(5000, function ($backups) {
|
||||||
foreach ($backups as $backup) {
|
foreach ($backups as $backup) {
|
||||||
|
|
||||||
if($backup->activity->client()->exists()){
|
if(strlen($backup->html_backup) > 1 && $backup->activity->client()->exists()){
|
||||||
|
|
||||||
$client = $backup->activity->client;
|
$client = $backup->activity->client;
|
||||||
$backup->storeRemotely($backup->html_backup, $client);
|
$backup->storeRemotely($backup->html_backup, $client);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user