Update (test): add indexing route
This commit is contained in:
@@ -19,16 +19,16 @@ protected function schedule(Schedule $schedule): void
|
||||
|
||||
$launched_date = Carbon::parse(config('platform.global.launched_epoch'));
|
||||
$days_since_launch = now()->diffInDays($launched_date) + 1;
|
||||
|
||||
$posts_to_generate = get_exponential_posts_gen_by_day($days_since_launch);
|
||||
$mins_betwween_posts = floor((24 * 60) / $posts_to_generate);
|
||||
$mins_between_posts = floor((24 * 60) / $posts_to_generate);
|
||||
|
||||
$schedule->call(function () {
|
||||
AISerpGenArticleJob::dispatch()->onQueue('default')->onConnection('default');
|
||||
|
||||
})->everyMinutes($mins_betwween_posts)->when(function () use ($mins_betwween_posts) {
|
||||
return now()->minute % $mins_betwween_posts === 0;
|
||||
})->everyMinute()->when(function () use ($mins_between_posts, $launched_date) {
|
||||
$minutes_since_launch = now()->diffInMinutes($launched_date);
|
||||
return $minutes_since_launch % $mins_between_posts === 0;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/now-minute', function (Request $request) {
|
||||
dd(now()->minute);
|
||||
});
|
||||
|
||||
|
||||
Route::get('/indexing', [App\Http\Controllers\Tests\TestController::class, 'indexing']);
|
||||
|
||||
Route::get('/serp-ai-gen', function (Request $request) {
|
||||
|
||||
Reference in New Issue
Block a user