def get_current_worker_task():
 for task in reversed(_task_stack.stack):
  if (not task.request.called_directly):
   return task

def get_current_worker_task ( ) : for task in reversed ( _task_stack . stack ) : if ( not task . request . called_directly ) : return task
currently executing task .