Code to sync data into redis