Added prioritized tasks and implemented in both redit and mem store