Download app/Console/Commands/EnqueueRecurringSocialPosts.php from medilis/teknolis: direct link, hf CLI and curl.
- Browser
- Download file 965 Bytes
-
https://huggingface.co/spaces/medilis/teknolis/resolve/main/app/Console/Commands/EnqueueRecurringSocialPosts.php
- Command line
-
hf download hf://spaces/medilis/teknolis/app/Console/Commands/EnqueueRecurringSocialPosts.php
-
curl -L -o EnqueueRecurringSocialPosts.php https://huggingface.co/spaces/medilis/teknolis/resolve/main/app/Console/Commands/EnqueueRecurringSocialPosts.php
965 Bytes
| namespace App\Console\Commands; | |
| use App\Services\SocialRecurringCampaignService; | |
| use Illuminate\Console\Command; | |
| class EnqueueRecurringSocialPosts extends Command | |
| { | |
| protected $signature = 'social:enqueue-recurring {--limit=30 : Jumlah campaign yang diproses per run} {--window=60 : Window menit ke depan untuk mengisi queue}'; | |
| protected $description = 'Membuat queue post baru dari campaign social yang berulang.'; | |
| public function handle(SocialRecurringCampaignService $recurringCampaigns): int | |
| { | |
| $processed = $recurringCampaigns->enqueueDueCampaigns( | |
| (int) $this->option('limit'), | |
| (int) $this->option('window') | |
| ); | |
| if ($processed === 0) { | |
| $this->info('Tidak ada recurring campaign yang perlu mengisi queue.'); | |
| return self::SUCCESS; | |
| } | |
| $this->info("Recurring queue generated: {$processed} campaign diproses."); | |
| return self::SUCCESS; | |
| } | |
| } | |