Using worker to generate key in background