Skip to content

Commit c7f3474

Browse files
committed
Merge branch 'feature/async' into async-with-cn
2 parents 76c7db3 + 13e5ef9 commit c7f3474

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

src/Queue/ClientJob.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class ClientJob extends Model implements AsynchronousProcess
4040
'failed',
4141
'resource_type',
4242
'resource_id',
43-
'status',
4443
'timeout',
4544
'timeout_at',
4645
'tries',

src/Queue/ClientJobSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getAttributes($resource)
4343
'created-at' => $resource->created_at->format($this->dateFormat),
4444
'completed-at' => $completedAt ? $completedAt->format($this->dateFormat) : null,
4545
'failed' => $resource->failed,
46-
'resource' => $resource->resource_type,
46+
'resource-type' => $resource->resource_type,
4747
'timeout' => $resource->timeout,
4848
'timeout-at' => $timeoutAt ? $timeoutAt->format($this->dateFormat) : null,
4949
'tries' => $resource->tries,

tests/lib/Integration/Queue/ClientDispatchTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testCreate()
5959
'created-at' => Carbon::now()->format('Y-m-d\TH:i:s.uP'),
6060
'completed-at' => null,
6161
'failed' => false,
62-
'resource' => 'downloads',
62+
'resource-type' => 'downloads',
6363
'timeout' => 60,
6464
'timeout-at' => null,
6565
'tries' => null,
@@ -112,7 +112,7 @@ public function testCreateWithClientGeneratedId()
112112
$this->doCreate($data)->assertAcceptedWithId('http://localhost/api/v1/downloads/queue-jobs', [
113113
'type' => 'queue-jobs',
114114
'attributes' => [
115-
'resource' => 'downloads',
115+
'resource-type' => 'downloads',
116116
'timeout' => 60,
117117
'timeout-at' => null,
118118
'tries' => null,
@@ -152,7 +152,7 @@ public function testUpdate()
152152
$expected = [
153153
'type' => 'queue-jobs',
154154
'attributes' => [
155-
'resource' => 'downloads',
155+
'resource-type' => 'downloads',
156156
'timeout' => null,
157157
'timeout-at' => Carbon::now()->addSeconds(25)->format('Y-m-d\TH:i:s.uP'),
158158
'tries' => null,
@@ -194,7 +194,7 @@ public function testDelete()
194194
$this->doDelete($download)->assertAcceptedWithId('http://localhost/api/v1/downloads/queue-jobs', [
195195
'type' => 'queue-jobs',
196196
'attributes' => [
197-
'resource' => 'downloads',
197+
'resource-type' => 'downloads',
198198
'timeout' => null,
199199
'timeout-at' => null,
200200
'tries' => 5,

tests/lib/Integration/Queue/QueueJobsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function testListAll()
2020
factory(ClientJob::class)->create(['resource_type' => 'foo']);
2121

2222
$this->getJsonApi('/api/v1/downloads/queue-jobs')
23-
->assertSearchedIds($jobs);
23+
->assertFetchedMany($jobs);
2424
}
2525

2626
public function testReadPending()
@@ -29,7 +29,7 @@ public function testReadPending()
2929
$expected = $this->serialize($job);
3030

3131
$this->getJsonApi($expected['links']['self'])
32-
->assertRead($expected);
32+
->assertFetchedOneExact($expected);
3333
}
3434

3535
/**
@@ -59,7 +59,7 @@ public function testReadNotPendingCannotSeeOther()
5959
$expected = $this->serialize($job);
6060

6161
$this->getJsonApi($this->jobUrl($job))
62-
->assertRead($expected)
62+
->assertFetchedOneExact($expected)
6363
->assertHeaderMissing('Location');
6464
}
6565

@@ -102,7 +102,7 @@ private function serialize(ClientJob $job): array
102102
'created-at' => $job->created_at->format($format),
103103
'completed-at' => $job->completed_at ? $job->completed_at->format($format) : null,
104104
'failed' => $job->failed,
105-
'resource' => 'downloads',
105+
'resource-type' => 'downloads',
106106
'timeout' => $job->timeout,
107107
'timeout-at' => $job->timeout_at ? $job->timeout_at->format($format) : null,
108108
'tries' => $job->tries,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy