Code refactoring. Moving redis publish code to Model