This repository was archived by the owner on Nov 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +26
-8
lines changed Expand file tree Collapse file tree 7 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ services:
3232 args :
3333 version : 7.2
3434 dockerfile : Dockerfile
35+ stdin_open : true
36+ tty : true
3537 depends_on :
3638 - driver
3739 - laravel
Original file line number Diff line number Diff line change @@ -16,3 +16,6 @@ php artisan cache:clear --no-interaction
1616
1717# Run migrations
1818php artisan migrate --no-interaction --seed
19+
20+ # Run default process
21+ php -a
Original file line number Diff line number Diff line change @@ -64,12 +64,13 @@ public function delete(Collection $models)
6464
6565 $ models ->each (function ($ model ) use ($ bulkPayload ) {
6666 $ actionPayload = (new RawPayload ())
67- ->set ('delete._id ' , $ model ->getKey ())
68- ->set ('ignore ' , 404 );
67+ ->set ('delete._id ' , $ model ->getKey ());
6968
7069 $ bulkPayload ->add ('body ' , $ actionPayload ->get ());
7170 });
7271
72+ $ bulkPayload ->set ('client.ignore ' , 404 );
73+
7374 ElasticClient::bulk ($ bulkPayload ->get ());
7475 }
7576}
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public function delete(Collection $models)
5252 {
5353 $ models ->each (function ($ model ) {
5454 $ payload = (new DocumentPayload ($ model ))
55- ->set ('ignore ' , 404 )
55+ ->set ('client. ignore ' , 404 )
5656 ->get ();
5757
5858 ElasticClient::delete ($ payload );
Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ public function testDelete()
9595 ['delete ' => ['_id ' => 1 ]],
9696 ['delete ' => ['_id ' => 2 ]],
9797 ['delete ' => ['_id ' => 3 ]]
98+ ],
99+ 'client ' => [
100+ 'ignore ' => 404
98101 ]
99102 ]);
100103
@@ -103,4 +106,4 @@ public function testDelete()
103106
104107 $ this ->addToAssertionCount (1 );
105108 }
106- }
109+ }
Original file line number Diff line number Diff line change @@ -126,26 +126,35 @@ public function testDelete()
126126 ->with ([
127127 'index ' => 'test ' ,
128128 'type ' => 'test ' ,
129- 'id ' => 1
129+ 'id ' => 1 ,
130+ 'client ' => [
131+ 'ignore ' => 404
132+ ]
130133 ])
131134 ->shouldReceive ('delete ' )
132135 ->once ()
133136 ->with ([
134137 'index ' => 'test ' ,
135138 'type ' => 'test ' ,
136- 'id ' => 2
139+ 'id ' => 2 ,
140+ 'client ' => [
141+ 'ignore ' => 404
142+ ]
137143 ])
138144 ->shouldReceive ('delete ' )
139145 ->once ()
140146 ->with ([
141147 'index ' => 'test ' ,
142148 'type ' => 'test ' ,
143- 'id ' => 3
149+ 'id ' => 3 ,
150+ 'client ' => [
151+ 'ignore ' => 404
152+ ]
144153 ]);
145154
146155 (new SingleIndexer ())
147156 ->delete ($ this ->models );
148157
149158 $ this ->addToAssertionCount (1 );
150159 }
151- }
160+ }
You can’t perform that action at this time.
0 commit comments