-
- Downloads
Delete all pruned persisted info records (#39219) (#39236)
We prune persisted info records if they meet any of the following
criteria:
```clojure
(or (contains? (persisted-info/prunable-states) current-state)
(:archived card-info)
(not (:dataset card-info)))
```
But we only deleted the record when:
```clojure
(when (= "deletable" current-state)
(t2/delete! PersistedInfo :id (:id persisted-info)))
```
So any records that were in a "creating" state (persist a model, but
before it first gets persisted, make it not a model, or archive the
underlying model), we constantly pruned them but never removed the
persisted info record.
Leading to task results like:
```javascript
{"success": 21, "error": 0, "skipped": 0}
```
Because 21 things were queued up for pruning, were attempted to be
pruned, but the persisted info record never removed.
Co-authored-by:
dpsutton <dan@dpsutton.com>
Please register or sign in to comment