You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a Job and command, my job is calling to a service class
Command:
public function handle()
{
\App\Jobs\SyncFranchises::dispatch()->onQueue('sync');
}
Job:
public function handle()
{
$saveFranchise = new SaveFranchise();
$saveFranchise->saveFranchise();
}
service
public function saveFranchise()
{
Forrest::authenticate();
$productQuery = Forrest::query("SELECT Id,Name,Description,MarketArea__c, LastModifiedDate FROM
Product2 WHERE Family = 'Lilly CloudRestaurant'");
foreach ($productQuery['records'] as $product)
{
$franchise = new Franchise();
$franchise->name = $product['Name'];
$franchise->description = $product['Description'];
$franchise->min_distance = round($product['MarketArea__c']);
$franchise->salesforce_id = $product['Id'];
$franchise->save();
}
}
I'm using Forrest::authenticate(); on the service, but I get this error on failed_jobs
RuntimeException: Session store not set on request. in /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Request.php:502
Stack trace:
#0 /var/www/html/vendor/omniphx/forrest/src/Omniphx/Forrest/Providers/Laravel/ForrestServiceProvider.php(38): Illuminate\Http\Request->session()
#1 /var/www/html/vendor/omniphx/forrest/src/Omniphx/Forrest/Providers/BaseServiceProvider.php(93): Omniphx\Forrest\Providers\Laravel\ForrestServiceProvider->getStorage()
Your config/forrest.php should have a username configured as well but I'm not sure why you are getting an error about session store. Especially if you configured your app to use cache instead of session.
Hello, I have a Job and command, my job is calling to a service class
Command:
Job:
service
I'm using
Forrest::authenticate();
on the service, but I get this error on failed_jobsMy config/forrest.php file has this
I have read that with 'storage' => ['type' => 'cache'], it should be solved, but I still have the same problem when executing the command
The text was updated successfully, but these errors were encountered: