Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Dec 29, 2024
1 parent 04c0e29 commit 8abfd2d
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

// If the task has a json log in database (new format)
} else {
$loggingController = new \Controllers\Logging\Logging($taskId);
$loggingController = new \Controllers\Task\Log\Log($taskId);

// Get raw params from the task
$rawParams = json_decode($taskInfo['Raw_params'], true);
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Repo/Mirror/Mirror.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Mirror
public function __construct(int $taskId)
{
$this->taskId = $taskId;
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);
}

public function setTaskId(string $taskId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php

namespace Controllers\Logging;
namespace Controllers\Task\Log;

use Exception;
use JsonException;

class Logging
class Log
{
protected $model;
protected $taskId;

public function __construct(int $taskId)
{
$this->taskId = $taskId;
$this->model = new \Models\Logging\Logging($taskId);
$this->model = new \Models\Task\Log\Log($taskId);
}

/**
Expand All @@ -22,8 +22,8 @@ public function __construct(int $taskId)
public function getContent() : array
{
$content = [];
$stepController = new \Controllers\Logging\Step($this->taskId);
$subStepController = new \Controllers\Logging\SubStep($this->taskId);
$stepController = new \Controllers\Task\Log\Step($this->taskId);
$subStepController = new \Controllers\Task\Log\SubStep($this->taskId);

try {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

namespace Controllers\Logging;
namespace Controllers\Task\Log;

use Exception;
use Datetime;

class Step extends Logging
class Step extends Log
{
public function __construct(int $taskId)
{
parent::__construct($taskId);

// Override parent model with the SubStep model
$this->model = new \Models\Logging\Step($taskId);
$this->model = new \Models\Task\Log\Step($taskId);
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace Controllers\Logging;
namespace Controllers\Task\Log;

use Exception;
use JsonException;

class SubStep extends Logging
class SubStep extends Log
{
private $stepController;

Expand All @@ -14,7 +14,7 @@ public function __construct(int $taskId)
parent::__construct($taskId);

// Override parent model with the SubStep model
$this->model = new \Models\Logging\SubStep($taskId);
$this->model = new \Models\Task\Log\SubStep($taskId);

$this->stepController = new Step($taskId);
}
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Repo/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public function __construct(string $taskId)
{
$this->repo = new \Controllers\Repo\Repo();
$this->task = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

/**
* Retrieve task params
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Repo/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function __construct(string $taskId)
{
$this->repo = new \Controllers\Repo\Repo();
$this->task = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

/**
* Retrieve task params
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Repo/Duplicate.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function __construct(string $taskId)
$this->sourceRepo = new \Controllers\Repo\Repo();
$this->repo = new \Controllers\Repo\Repo();
$this->task = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

/**
* Retrieve task params
Expand Down
2 changes: 1 addition & 1 deletion www/controllers/Task/Repo/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct(string $taskId)
{
$this->repo = new \Controllers\Repo\Repo();
$this->task = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);

/**
* Retrieve task params
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Repo/Metadata/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Metadata
public function __construct(int $taskId)
{
$this->taskController = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

// Set task Id
$this->taskController->setId($taskId);
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Repo/Rebuild.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function __construct(string $taskId)
{
$this->repo = new \Controllers\Repo\Repo();
$this->task = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

/**
* Retrieve task params
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Repo/RemoveEnv.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function __construct(string $taskId)
{
$this->repo = new \Controllers\Repo\Repo();
$this->task = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

/**
* Retrieve task params
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Repo/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public function __construct(string $taskId)
$this->sourceRepo = new \Controllers\Repo\Repo();
$this->repo = new \Controllers\Repo\Repo();
$this->task = new \Controllers\Task\Task();
$this->loggingStepController = new \Controllers\Logging\Step($taskId);
$this->loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$this->loggingStepController = new \Controllers\Task\Log\Step($taskId);
$this->loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

/**
* Retrieve task params
Expand Down
2 changes: 1 addition & 1 deletion www/controllers/Task/Step.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Step

public function __construct(int $taskId)
{
$this->loggingController = new \Controllers\Logging\Logging($taskId);
$this->loggingController = new \Controllers\Task\Log\Log($taskId);
$this->taskId = $taskId;

/**
Expand Down
4 changes: 2 additions & 2 deletions www/controllers/Task/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,8 @@ public function kill(string $pid)
*/
$this->updateStatus($taskId, 'stopped');

$loggingStepController = new \Controllers\Logging\Step($taskId);
$loggingSubStepController = new \Controllers\Logging\SubStep($taskId);
$loggingStepController = new \Controllers\Task\Log\Step($taskId);
$loggingSubStepController = new \Controllers\Task\Log\SubStep($taskId);

/**
* Set latest step and substep as stopped
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Models\Logging;
namespace Models\Task\Log;

use Exception;

class Logging extends \Models\Model
class Log extends \Models\Model
{
public function __construct(int $taskId)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Models\Logging;
namespace Models\Task\Log;

use Exception;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Models\Logging;
namespace Models\Task\Log;

use Exception;

Expand Down

0 comments on commit 8abfd2d

Please sign in to comment.