Fix setting the type of worker

This allow the restart command to work properly, otherwise it's not going to start a scheduler job.