Added retrying of failed task in queue