Users have multiple ways to check the task status including the followings:
You can find more detailed information regarding the above methods in How to track failed tasks.
In this article, we aim to introduce an alternative method to check the task status using queries on CCNG console.
Steps to connect to CCNG console:
Some example queries:
Some example query outputs for reference:
cloud_controller/SOME-GUID:/var/vcap/jobs/cloud_controller_ng# bin/console
[1] pry(VCAP::CloudController)> TaskModel.where(state: TaskModel::PENDING_STATE).where(Sequel.lit('created_at < ?', 1.hour.ago)).count
=> 1
[2] pry(VCAP::CloudController)> TaskModel.where(state: TaskModel::FAILED_STATE).where(Sequel.lit('created_at < ?', 1.hour.ago)).count
=> 40
[3] pry(VCAP::CloudController)> TaskModel.where(state: TaskModel::PENDING_STATE).where(Sequel.lit('created_at < ?', 1.hour.ago)).sum(:memory_in_mb)
=> 1024