Automattic / Automattic/kue

specify TTL on removeOnComplete

Open
#963 2 comments 8 reactions 0 assignees View on GitHub
Discussion Feature needs pull request
Dominant language
JavaScript
Stars
9.4k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

To keep track of successful jobs (their payloads), it could be useful to keep the job alive for a predetermined time.

This can be accomplished very easily specifying a TTL in the REDIS hash containing job informations.

The API could be:

```
queue.create( ... ).removeOnComplete( 3600 * 24 ).save()
```

In such way the job informations would be available for 24 hours prior to automatic removal by REDIS
Do you think it's a valid use-case?

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by locating the queue.create(...).removeOnComplete implementation and the Redis hash lifecycle; determine how a TTL could be passed through the API. Done means successful job data remains available for the requested duration and is then removed automatically, with coverage for the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, redis
Domain
api, backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.