Refactor integration tasks to handle production and staging apps