cleanup analytics queries

This commit is contained in:
Brandon Thomas
2024-08-08 17:44:39 -04:00
parent b3be085994
commit 6d4adfe60f
20 changed files with 31 additions and 12 deletions
@@ -0,0 +1,8 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- Get pending job count
select count(*)
from generic_inference_jobs
where status = 'pending';
@@ -2,31 +2,30 @@
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- Kill routed jobs
update generic_inference_jobs set status = 'dead' where maybe_routing_tag IS NOT NULL limit 100;
-- Get pending jobs
select count(*) from generic_inference_jobs where status = 'pending';
-- Kill outstanding jobs
-- Kill *ALL* pending / outstanding jobs of any type
update generic_inference_jobs
set status = 'dead'
where status IN ('pending', 'started', 'attempt_failed');
-- Kill outstanding jobs of type
-- Kill all routed jobs
update generic_inference_jobs
set status = 'dead'
where status IN ('pending', 'started', 'attempt_failed')
and maybe_model_type IN ('sad_talker', 'so_vits_svc');
where maybe_routing_tag IS NOT NULL;
-- Tacotron 2 TTS
-- Kill all Tacotron TTS jobs
update generic_inference_jobs
set status = 'dead'
where status IN ('pending', 'started', 'attempt_failed')
and maybe_model_type IN ('tacotron2');
-- Sad Talker Face Animation
-- Kill all Sad Talker Face Animation jobs
update generic_inference_jobs
set status = 'dead'
where status IN ('pending', 'started', 'attempt_failed')
and maybe_model_type IN ('sad_talker');
-- Kill all jobs of several types
update generic_inference_jobs
set status = 'dead'
where status IN ('pending', 'started', 'attempt_failed')
and maybe_model_type IN ('sad_talker', 'so_vits_svc');
@@ -0,0 +1,12 @@
-- noinspection SqlDialectInspectionForFile
-- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlResolveForFile
-- List GptSoVits model downloads for user (Vegito)
select *
from generic_inference_jobs
where maybe_creator_user_token = 'U:E00D2RD3ZNZ7P'
and job_type = 'gpt_sovits'
and maybe_download_url IS NOT NULL
order by id desc
limit 100\G