Skip to content

Commit d0b41a5

Browse files
committed
TASK: Require next version of jobqueue-common and change interfaces accordingly
1 parent 457f732 commit d0b41a5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Classes/IndexingJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class IndexingJob extends AbstractIndexingJob
2929
* @return boolean TRUE if the job was executed successfully and the message should be finished
3030
* @throws \Exception
3131
*/
32-
public function execute(QueueInterface $queue, Message $message)
32+
public function execute(QueueInterface $queue, Message $message): bool
3333
{
3434
$this->nodeIndexer->withBulkProcessing(function () {
3535
$numberOfNodes = count($this->nodes);
@@ -76,7 +76,7 @@ public function execute(QueueInterface $queue, Message $message)
7676
*
7777
* @return string A label for the job
7878
*/
79-
public function getLabel()
79+
public function getLabel(): string
8080
{
8181
return sprintf('Elasticsearch Indexing Job (%s)', $this->getIdentifier());
8282
}

Classes/RemovalJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RemovalJob extends AbstractIndexingJob
3030
* @return boolean TRUE if the job was executed successfully and the message should be finished
3131
* @throws \Exception
3232
*/
33-
public function execute(QueueInterface $queue, Message $message)
33+
public function execute(QueueInterface $queue, Message $message): bool
3434
{
3535
$this->nodeIndexer->withBulkProcessing(function () {
3636
$numberOfNodes = count($this->nodes);
@@ -85,7 +85,7 @@ public function execute(QueueInterface $queue, Message $message)
8585
*
8686
* @return string A label for the job
8787
*/
88-
public function getLabel()
88+
public function getLabel(): string
8989
{
9090
return sprintf('Elasticsearch Removal Job (%s)', $this->getIdentifier());
9191
}

Classes/UpdateAliasJob.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct($indexPostfix)
5858
* @throws \Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception
5959
* @throws \Flowpack\ElasticSearch\Transfer\Exception\ApiException
6060
*/
61-
public function execute(QueueInterface $queue, Message $message)
61+
public function execute(QueueInterface $queue, Message $message): bool
6262
{
6363
$this->nodeIndexer->setIndexNamePostfix($this->indexPostfix);
6464
$this->nodeIndexer->updateIndexAlias();
@@ -82,7 +82,7 @@ public function getIdentifier()
8282
*
8383
* @return string A label for the job
8484
*/
85-
public function getLabel()
85+
public function getLabel(): string
8686
{
8787
return sprintf('ElasticSearch Indexing Job (%s)', $this->getIdentifier());
8888
}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"description": "Neos CMS Elasticsearch indexer based on a job queue",
55
"license": "MIT",
66
"require": {
7-
"flowpack/jobqueue-common": "^2.0.0",
8-
"flowpack/elasticsearch-contentrepositoryadaptor": "^4.0.0"
7+
"flowpack/jobqueue-common": "^3.0 || dev-master",
8+
"flowpack/elasticsearch-contentrepositoryadaptor": "^4.0"
99
},
1010
"autoload": {
1111
"psr-4": {

0 commit comments

Comments
 (0)