Skip to content

Commit 3e6f21b

Browse files
committed
Merge remote-tracking branch 'origin/cake4'
# Conflicts: # .gitignore # README.md # composer.json # src/Command/InfoCommand.php # tests/TestCase/Command/JobCommandTest.php # tests/TestCase/Controller/Admin/QueueControllerTest.php # tests/TestCase/Model/Table/QueuedJobsTableTest.php # tests/TestCase/View/Helper/QueueProgressHelperTest.php
2 parents 54283fc + 5adb5b7 commit 3e6f21b

File tree

5 files changed

+29
-9
lines changed

5 files changed

+29
-9
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
composer.lock
66
schema-dump-default.lock
77
composer.phar
8-
/.phpunit.cache
9-
.phpunit.result.cache
8+
/.phpunit.result.cache
9+
/.phpunit.cache/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Coverage Status](https://img.shields.io/codecov/c/github/dereuromark/cakephp-queue/master.svg)](https://codecov.io/github/dereuromark/cakephp-queue/branch/master)
44
[![Latest Stable Version](https://poser.pugx.org/dereuromark/cakephp-queue/v/stable.svg)](https://packagist.org/packages/dereuromark/cakephp-queue)
55
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF.svg)](https://php.net/)
6+
[![PHPStan](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat)](https://phpstan.org/)
67
[![License](https://poser.pugx.org/dereuromark/cakephp-queue/license)](https://packagist.org/packages/dereuromark/cakephp-queue)
78
[![Total Downloads](https://poser.pugx.org/dereuromark/cakephp-queue/d/total)](https://packagist.org/packages/dereuromark/cakephp-queue)
89
[![Coding Standards](https://img.shields.io/badge/cs-PSR--2--R-yellow.svg)](https://github.com/php-fig-rectified/fig-rectified-standards)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use Phinx\Migration\AbstractMigration;
4+
5+
class MigrationAddIndex extends AbstractMigration {
6+
7+
/**
8+
* @return void
9+
*/
10+
public function change() {
11+
$table = $this->table('queued_jobs');
12+
$table
13+
->addIndex('completed')
14+
->addIndex('job_task')
15+
->update();
16+
}
17+
18+
}

src/Controller/Admin/QueueController.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,14 @@ public function index() {
5858
$tasks = $taskFinder->all();
5959
$addableTasks = $taskFinder->allAddable(AddFromBackendInterface::class);
6060

61-
$servers = $QueueProcesses->find()->distinct(['server'])->find(
62-
'list',
63-
keyField: 'server',
64-
valueField: 'server',
65-
)->toArray();
61+
$servers = $QueueProcesses->find()
62+
->distinct(['server'])
63+
->where(['server IS NOT' => null])
64+
->find(
65+
'list',
66+
keyField: 'server',
67+
valueField: 'server',
68+
)->toArray();
6669
$this->set(compact('new', 'current', 'data', 'pendingDetails', 'status', 'tasks', 'addableTasks', 'servers'));
6770
}
6871

tests/TestCase/Controller/Admin/QueueControllerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public function testLoadHelpers(): void {
5757
* @return void
5858
*/
5959
public function testIndex() {
60-
$this->skipIf(true, 'Needs fixing');
61-
6260
$this->get(['prefix' => 'Admin', 'plugin' => 'Queue', 'controller' => 'Queue', 'action' => 'index']);
6361

6462
$this->assertResponseCode(200);

0 commit comments

Comments
 (0)