galaxyproject / galaxyproject/gxadmin

purge job metrics table from time to time

Open
#81 0 comments 1 reaction 0 assignees View on GitHub
feature request
Dominant language
Shell
Stars
24
Forks
30
Avg merge
3d 10h
Merged PRs (30d)
5

Description

```
# Delete text job metrics for successful or old jobs (not useful for debugging).
# Delete numeric job metrics for old unsuccessful jobs (not useful for statistics or debugging).
DELETE FROM job_metric_text USING job WHERE job_id=job.id AND (job.state='ok' OR CURRENT_TIMESTAMP - job.update_time > '1 year');
VACUUM FULL job_metric_text;
DELETE FROM job_metric_numeric USING job WHERE job_id=job.id AND job.state IN ('deleted', 'error') AND CURRENT_TIMESTAMP - job.update_time > '1 year';
VACUUM FULL job_metric_numeric;
```

From @nsoranzo

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.