Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
WP Plugins
Cron-Control
Commits
21b98592
Verified
Commit
21b98592
authored
Dec 13, 2016
by
Erick Hitter
Browse files
Simplify logic around event reorganization loop
parent
972f5410
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/class-events.php
View file @
21b98592
...
...
@@ -144,12 +144,7 @@ class Events extends Singleton {
$i
=
1
;
// Intentionally not zero-indexed to facilitate comparisons against $action_counts members
while
(
count
(
$reduced_queue
)
<
JOB_QUEUE_SIZE
&&
!
empty
(
$events
)
)
{
// Circuit breaker
if
(
$i
>
15
)
{
break
;
}
while
(
$i
<=
15
&&
count
(
$reduced_queue
)
<
JOB_QUEUE_SIZE
&&
!
empty
(
$events
)
)
{
// Each time the events array is iterated over, move one instance of an action to the current queue
foreach
(
$events
as
$key
=>
$event
)
{
$action
=
$event
[
'action'
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment