celery/celery — pull request #1525 by mattrobenolt (2013-08-29 16:19:19+00:00)
Title: Speed up the precedence state lookup

`PRECEDENCE.index(state)` is an O(n) operation, and the hash lookup is O(1)

For this, I could have easily just built the dict by hand and used `PRECEDENCE`, but I didn't want to clobber that variable incase someone out there is importing it for some other weird purpose. Better to play it safe. :)