Skip to content

Commit 82dfb28

Browse files
committed
Cleanup
1 parent dfb24c6 commit 82dfb28

File tree

3 files changed

+3
-28
lines changed

3 files changed

+3
-28
lines changed

src/CloudTasksException.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/CloudTasksQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected function pushToCloudTasks($queue, $payload, $delay = 0)
162162
$queueName = $this->client->queueName($this->config['project'], $this->config['location'], $queue);
163163
CloudTasksApi::createTask($queueName, $task);
164164

165-
event((new TaskCreated)->queue($queue)->task($task));
165+
event(new TaskCreated($queue, $task));
166166

167167
return $payload['uuid'];
168168
}

src/Events/TaskCreated.php

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,8 @@
88

99
class TaskCreated
1010
{
11-
public string $queue;
12-
13-
public Task $task;
14-
15-
public function task(Task $task): self
11+
public function __construct(public string $queue, public Task $task)
1612
{
17-
$this->task = $task;
18-
19-
return $this;
20-
}
21-
22-
public function queue(string $queue): self
23-
{
24-
$this->queue = $queue;
25-
26-
return $this;
13+
//
2714
}
2815
}

0 commit comments

Comments
 (0)