moving structure works back to jobs

This commit is contained in:
2019-05-30 19:47:40 -05:00
parent 57dc1f2c4d
commit 4f272fc3a1
4 changed files with 5 additions and 41 deletions

View File

@@ -107,13 +107,6 @@ class GetStructuresCommand extends Command
return null; return null;
} }
for($i = 1; $i <= $structures->pages; $i++) {
$sHelper = new StructureHelper($charId, $corpId, $i);
$sHelper->Start();
}
/*
for($i = 1; $i <= $structures->pages; $i++) { for($i = 1; $i <= $structures->pages; $i++) {
$job = new JobProcessStructure; $job = new JobProcessStructure;
$job->charId = $charId; $job->charId = $charId;
@@ -121,7 +114,6 @@ class GetStructuresCommand extends Command
$job->page = $i; $job->page = $i;
ProcessStructureJob::dispatch($job)->onQueue('structures'); ProcessStructureJob::dispatch($job)->onQueue('structures');
} }
*/
//Mark the job as finished //Mark the job as finished
$task->SetStopStatus(); $task->SetStopStatus();

View File

@@ -3,6 +3,8 @@
/** /**
* W4RP Services * W4RP Services
* GNU Public License * GNU Public License
*
* Finally works in it's current state. Need to move to a job process.
*/ */
namespace App\Library\Structures; namespace App\Library\Structures;
@@ -115,7 +117,6 @@ class StructureHelper {
//Save the database record //Save the database record
$st->save(); $st->save();
dd($st);
} }
} }
} }

View File

@@ -12,7 +12,7 @@ class Structure extends Model
*/ */
//Table Name //Table Name
public $table = 'AllianceStructures'; public $table = 'alliance_structures';
//Primary Key //Primary Key
public $primaryKey = 'id'; public $primaryKey = 'id';

View File

@@ -41,34 +41,6 @@ class CorporationAssetsTable extends Migration
}); });
} }
if(!Schema::hasTable('AllianceStructures')) {
Schema::create('AllianceStructures', function(Blueprint $table) {
$table->increments('id');
$table->string('structure_id')->unique();
$table->string('structure_name');
$table->string('solar_system_id');
$table->string('solar_system_name')->nullable();
$table->string('type_id');
$table->string('corporation_id');
$table->boolean('services');
$table->string('state');
$table->dateTime('state_timer_start')->nullable();
$table->dateTime('state_timer_end')->nullable();
$table->dateTime('fuel_expires')->nullable();
$table->string('profile_id');
$table->string('position_x');
$table->string('position_y');
$table->string('position_z');
$table->dateTime('next_reinforce_apply')->nullable();
$table->integer('next_reinforce_hour')->nullable();
$table->integer('next_reinforce_weekday')->nullable();
$table->integer('reinforce_hour');
$table->integer('reinforce_weekday')->nullable();
$table->dateTime('unanchors_at')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('alliance_services')) { if(!Schema::hasTable('alliance_services')) {
Schema::create('alliance_services', function(Blueprint $table) { Schema::create('alliance_services', function(Blueprint $table) {
$table->increments('id'); $table->increments('id');
@@ -104,7 +76,6 @@ class CorporationAssetsTable extends Migration
public function down() public function down()
{ {
Schema::dropIfExists('alliance_structures'); Schema::dropIfExists('alliance_structures');
Schema::dropIfExists('AllianceStructures');
Schema::dropIfExists('alliance_services'); Schema::dropIfExists('alliance_services');
Schema::dropIfExists('alliance_assets'); Schema::dropIfExists('alliance_assets');
} }