Created
September 24, 2015 15:29
-
-
Save jseifer/cf3c58b6ac7fe831789f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An array of ids is returned for rake task output (see lib/tasks/doc_news.rake) | |
def self.process_queued_for_sample!(time: Time.now) | |
unprocessed.sample_sent_at_for(time).map do |digest| | |
if digest.can_sample? | |
digest.sample! | |
digest.id | |
end | |
end | |
end | |
# An array of ids is returned for rake task output (see lib/tasks/doc_news.rake) | |
def self.process_queued_for_final_delivery!(time: Time.now) | |
sampled.final_sent_at_for(time).map do |digest| | |
if digest.deliverable? | |
digest.deliver! | |
digest.id | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment