Warning: It is essential that a database backup is taken before interacting with the sima_webapp database. That backup can then be used to restore the Job Status page content in case of problem. See the following knowledge article for further details on how to capture a database backup: Signals Image Artist: Backing up the Postgres databases
SImAs Job Status page content is stored in the cluster_jobstatus table of the sima_webapp database which is found in the SImA_postgres-server container service.
It's possible to list or remove individual Job Status page entries by querying the database directly via the SImA hosts command line interface using the following syntax:
docker exec $(docker ps -qf "name=postgres") psql -U columbus -d sima_webapp
-c "<psql_query>"
Where <psql_query>
should be replaced by a valid query.
Listing entries by job "State"
Jobs are listed as being in one of the following states, as reported by the "Status" column of SImAs Job Status page:
CO - Completed
FA - Failed
UN - Unknown
PE - Pending
RU - Running
SU - Submitting
To list all jobs with a "Failed" state:
psql_query: select id,state,created from cluster_jobstatus where state='FA';
command: docker exec $(docker ps -qf "name=postgres") psql -U columbus -d sima_webapp
-c "select id,state,created from cluster_jobstatus where state='FA';"
Deleting entries by job "State"
To delete all jobs with a "Unknown" state:
psql_query: delete from cluster_jobstatus where state='UN';
command: docker exec $(docker ps -qf "name=postgres") psql -U columbus -d sima_webapp
-c "delete from cluster_jobstatus where state='UN';"
Listing entries by job "ID"
Jobs can also be listed by their Job Status page ID. For example, to list job with ID "402":
psql_query: select id,state,created from cluster_jobstatus where id=402
command: docker exec $(docker ps -qf "name=postgres") psql -U columbus -d sima_webapp
-c "select id,state,created from cluster_jobstatus where id=402;"
Deleting entries by job "ID"
To delete job with ID "402":
psql_query: delete from cluster_jobstatus where id=402;
command: docker exec $(docker ps -qf "name=postgres") psql -U columbus -d sima_webapp
-c "delete from cluster_jobstatus where id=402;"
Comments
0 comments
Article is closed for comments.