Skip to content

Commit

Permalink
Remove redundant savePath constructor parameter from FileAdapter.php
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnetau committed Dec 20, 2023
1 parent a203991 commit 73175df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SaveHandler/FileAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class FileAdapter implements SaveHandlerInterface {

protected bool $asyncFaulty = false;

public function __construct( protected string $savePath, protected string $saveFileName, protected LoggerInterface $logger, protected ?LoopInterface $loop ) {
public function __construct( protected string $saveFileName, protected LoggerInterface $logger, protected ?LoopInterface $loop ) {
$this->loop ??= Loop::get();
}

Expand Down
3 changes: 2 additions & 1 deletion src/Scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ public function run() : void
$this->initialiseManagementServer();

/** Restore the state of the scheduler and engine */
$this->saveStateHandler = new FileAdapter(sys_get_temp_dir(), $this->saveFileName, $this->logger, $this->loop);
$this->saveStateHandler = new FileAdapter($this->saveFileName, $this->logger, $this->loop);
$this->restoreState();

/**
Expand All @@ -881,6 +881,7 @@ public function run() : void

/** Handle request to run an action */
$this->engine->on('action', function(Action $action) {
//@TODO Implement queue to rate limit execution of actions
$actionName = $action->getCmd();
if (isset($this->actionConfig[$actionName]))
{
Expand Down

0 comments on commit 73175df

Please sign in to comment.