better assignment (tasks go to not running workers only). Thanks @PengfeiYu

- pep8 adjustments
- tasks were assigned to all ACTIVE workers... if a worker is busy processing a task, 
  there's no point on assigning tasks to it