Skip to content

Commit 31ecc13

Browse files
committed
Sort the queue so we get the same job.
1 parent fb9f11d commit 31ecc13

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/wpephpcompat.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public function start_test() {
155155

156156
$args = array(
157157
'posts_per_page' => -1,
158-
'post_type' => 'wpephpcompat_jobs'
158+
'post_type' => 'wpephpcompat_jobs',
159+
'orderby' => 'title',
160+
'order' => 'ASC',
159161
);
160162
$directories = get_posts( $args );
161163
$this->debug_log( count( $directories ) . ' plugins left to process.' );

wpengine-phpcompat.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ function check_status() {
110110

111111
$active_job = false;
112112
$jobs = get_posts( array(
113-
'posts_per_page' => -1,
114-
'post_type' => 'wpephpcompat_jobs',
113+
'posts_per_page' => -1,
114+
'post_type' => 'wpephpcompat_jobs',
115+
'orderby' => 'title',
116+
'order' => 'ASC',
115117
) );
116118

117119
if ( 0 < count( $jobs ) ) {

0 commit comments

Comments
 (0)