mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update TransformImports command, increment status_count on profile model
This commit is contained in:
parent
0b5157675f
commit
ba7551d8a9
1 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,7 @@ use App\Media;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use App\Status;
|
use App\Status;
|
||||||
use Storage;
|
use Storage;
|
||||||
|
use App\Services\AccountService;
|
||||||
use App\Services\MediaPathService;
|
use App\Services\MediaPathService;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use App\Util\Lexer\Autolink;
|
use App\Util\Lexer\Autolink;
|
||||||
|
@ -38,7 +39,7 @@ class TransformImports extends Command
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ips = ImportPost::whereNull('status_id')->where('skip_missing_media', '!=', true)->take(200)->get();
|
$ips = ImportPost::whereNull('status_id')->where('skip_missing_media', '!=', true)->take(500)->get();
|
||||||
|
|
||||||
if(!$ips->count()) {
|
if(!$ips->count()) {
|
||||||
return;
|
return;
|
||||||
|
@ -135,6 +136,11 @@ class TransformImports extends Command
|
||||||
$ip->creation_id = $idk['incr'];
|
$ip->creation_id = $idk['incr'];
|
||||||
$ip->save();
|
$ip->save();
|
||||||
|
|
||||||
|
$profile->status_count = $profile->status_count + 1;
|
||||||
|
$profile->save();
|
||||||
|
|
||||||
|
AccountService::del($profile->id);
|
||||||
|
|
||||||
ImportService::clearAttempts($profile->id);
|
ImportService::clearAttempts($profile->id);
|
||||||
ImportService::getPostCount($profile->id, true);
|
ImportService::getPostCount($profile->id, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue