Whether the operation is successful or not , It will be recorded in the log file
We want to write Of queue Will be “ arrive earlier than before service ”（ first- come, first- served） Of mode send out mail , also whether send out whether
success , program metropolis hold send out result record reach journal inside . This book stay The first 3 chapter and The first 5 chapter in once introduce too , Redis Of list structure allow user
adopt RPUSH and LPUSH as well as RPOP and LPOP, from list Of both ends push into and eject element . this time Of mail queue Will make use RPUSH command
come take stay send out Of mail push into list Of Right end , also because work process except send out mail outside unwanted implement other work , therefore It will use block edition
Of eject command BLPOP from queue get shot Out stay send out Of mail , and command Of maximum block time limit by 30 second （ From the right edge push into element And from left eject
element Of practice , accord with We From left towards the right conduct read Of habit ）. in order to simple and convenient For the sake of , This section Exhibition Of task queue Only handle Sold Out commodity mail , however
add to in the light of Has passed stage commodity mail Of support also be not difficult matter .
Josiah L. Carlson (Josiah L. Carlson). Redis actual combat （ Asynchronous books ） (Kindle position 3646-3655). People's post and Telecommunications Press .
Kindle edition .