handle pubsub after database update