Skip to content

(POOLER-141) Fix order of processing migrating and pending queues#323

Merged
junebug-spencer merged 1 commit into
puppetlabs:masterfrom
mattkirby:POOLER_141
Apr 17, 2019
Merged

(POOLER-141) Fix order of processing migrating and pending queues#323
junebug-spencer merged 1 commit into
puppetlabs:masterfrom
mattkirby:POOLER_141

Conversation

@mattkirby

Copy link
Copy Markdown
Contributor

This commit updates how migrating and pending queues are processed. Sets to be processed are created with sadd in redis, and iterated over as a list in ruby. The latest member is added to the beginning of this set in redis, and becomes the first member of the set in ruby. To ensure that items are processed in the order they are added it is necessary to reverse the list before iterating through its members. Without this change the newest members of the set are processed first, which creates inconsistent times to evaluation.

This commit updates how migrating and pending queues are processed. Sets to be processed are created with sadd in redis, and iterated over as a list in ruby. The latest member is added to the beginning of this set in redis, and becomes the first member of the set in ruby. To ensure that items are processed in the order they are added it is necessary to reverse the list before iterating through its members. Without this change the newest members of the set are processed first, which creates inconsistent times to evaluation.
@junebug-spencer junebug-spencer merged commit 6141cd7 into puppetlabs:master Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants