firebase/firebase-work-queue — pull request #5 by dusty (2014-12-29 01:28:27+00:00)
Title: catch SIGINT/SIGTERM and cleanly exit

What do you think about something like this so you can cleanly kill a process without losing a queued item? See any errors in my logic?