tried de-serializing esi function
This commit is contained in:
@@ -111,7 +111,6 @@ class GetStructuresCommand extends Command
|
|||||||
$job->charId = $charId;
|
$job->charId = $charId;
|
||||||
$job->corpId = $corpId;
|
$job->corpId = $corpId;
|
||||||
$job->page = $i;
|
$job->page = $i;
|
||||||
$job->esi = $esi;
|
|
||||||
ProcessStructureJob::dispatch($job)->onQueue('default');
|
ProcessStructureJob::dispatch($job)->onQueue('default');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,18 @@ class ProcessStructureJob implements ShouldQueue
|
|||||||
$this->charId = $jps->charId;
|
$this->charId = $jps->charId;
|
||||||
$this->corpId = $jps->corpId;
|
$this->corpId = $jps->corpId;
|
||||||
$this->page = $jps->page;
|
$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
|
//Set the connection for the job
|
||||||
$this->connection = 'redis';
|
$this->connection = 'redis';
|
||||||
|
|||||||
@@ -21,6 +21,5 @@ class JobProcessStructure extends Model
|
|||||||
'charId',
|
'charId',
|
||||||
'corpId',
|
'corpId',
|
||||||
'page',
|
'page',
|
||||||
'esi',
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user