if ($res) {
Cache::forever($cacheKey, $res);
- Artisan::call('psq:fluidbook:updateindex');
}
sleep(30);
}
+ Artisan::call('psq:fluidbook:updateindex');
}
public static function getCacheKey($reference)
$publications[] = ['fluidbook' => $fluidbook->id];
}
}
- $client->setFluidbooksInCollection(config('fluidbook.collection'), $publications);
- $client->collectionRefreshSearchIndex(config('fluidbook.collection'));
+ $collection = config('fluidbook.collection');
+ $client->setFluidbooksInCollection($collection, $publications);
+ $client->collectionRefreshSearchIndex($collection);
}
}
protected function schedule(Schedule $schedule)
{
$schedule->job(new CheckForTrialExpirationDates)->dailyAt('13:00');
- $schedule->command('psq:fluidbook:archives')->dailyAt('04:00');
$schedule->command('psq:fluidbook:updatedemo')->cron('0 4 1,15 * *');
}
$batch = EmailBatch::createFromRequest($data);
$processEmailBatch = new ProcessEmailBatch($batch, $usersBuilder);
- dispatch_sync($processEmailBatch);
+ dispatch($processEmailBatch);
// if ($pdfBatch = EmailBatch::createAttachmentMailFromRequest($data)) {
// $userReceivesPdfBuilder->subscriber()->receivesPdf();
// }
-
return ['data' => $batch->id];
}
use Illuminate\Database\Eloquent\Relations;
use Illuminate\Http\File;
use Illuminate\Http\Request;
+use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cache;
use Laravel\Nova\Fields\HasOne;
use Storage;
if ($res) {
Cache::forever(self::getCacheKey($this->slug), $res);
+ dispatch(function () {
+ Artisan::call('psq:fluidbook:updateindex');
+ });
}
}