tried de-serializing esi function

This commit is contained in:
2019-05-29 21:36:32 -05:00
parent d285b22161
commit e02cc37a63
3 changed files with 12 additions and 3 deletions

View File

@@ -111,7 +111,6 @@ class GetStructuresCommand extends Command
$job->charId = $charId;
$job->corpId = $corpId;
$job->page = $i;
$job->esi = $esi;
ProcessStructureJob::dispatch($job)->onQueue('default');
}

View File

@@ -52,7 +52,18 @@ class ProcessStructureJob implements ShouldQueue
$this->charId = $jps->charId;
$this->corpId = $jps->corpId;
$this->page = $jps->page;
$this->esi = $jps->esi;
//Setup the esi authentication container
$config = config('esi');
//Get the refresh token from the database
$token = EsiToken::where(['character_id' => $charId])->get(['refresh_token']);
$authentication = new EsiAuthentication([
'client_id' => $config['client_id'],
'secret' => $config['secret'],
'refresh_token' => $token[0]->refresh_token,
]);
$this->esi = new Eseye($authentication);
//Set the connection for the job
$this->connection = 'redis';

View File

@@ -21,6 +21,5 @@ class JobProcessStructure extends Model
'charId',
'corpId',
'page',
'esi',
];
}