Refactor Rest method to include db operations and queues