Skip to content

Instantly share code, notes, and snippets.

@orangewolf
Created July 24, 2012 22:09
Show Gist options
  • Save orangewolf/3173005 to your computer and use it in GitHub Desktop.
Save orangewolf/3173005 to your computer and use it in GitHub Desktop.
bg_process = BgProcess.find_in_state(:first, :waiting, :order => "created_at ASC, id asc")
while bg_process
bg_process.check_and_run_process
bg_process = BgProcess.find_in_state(:first, :waiting, :order => "created_at ASC, id asc")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment