Added database stuff on the worker