Unfinished. Will change to Rails and use delay_job.