Comments (7)
ah, it cleans jobs before <period>
, not after. thanks, @darky !
from bull-repl.
For anyone who hits on this question in the future, if you want to include state and period, do not use the "ms()" call in the period examples. So, to clean everything in the last 24 hours from the "failed" state:
clean -s failed 24h
from bull-repl.
BULL-REPL | bull.qwe> clean -s failed
Missing required argument. Showing Help: // 1*
Usage: clean [options] <period> // 2*
Clean queue for period ago, period format - https://github.com/zeit/ms#examples // 3*
Options:
--help output usage information
-s, --status <status> Status of the job to clean, default: completed
-l, --limit <limit> Maximum amount of jobs to clean per call, default: all
On line 1* you can see, that cli tool properly say you about missing required argument
On line 2* you can see, that <period> is require argument
On line 3* you can see some examples (need click to link) of <period> format
from bull-repl.
trying bull-repl for the first time today and clean
is not working for me :
(text of screenshot for accessibility and seo)
BULL-REPL | bull.update-playlist> stats
┌───────────┬────────┐
│ (index) │ Values │
├───────────┼────────┤
│ waiting │ 0 │
│ active │ 2 │
│ completed │ 0 │
│ failed │ 4 │
│ delayed │ 0 │
│ paused │ 0 │
└───────────┴────────┘
BULL-REPL | bull.update-playlist> clean -l 10 -s failed -y 24h
Assuming yes for Clean
Jobs cleaned
BULL-REPL | bull.update-playlist> stats
┌───────────┬────────┐
│ (index) │ Values │
├───────────┼────────┤
│ waiting │ 0 │
│ active │ 2 │
│ completed │ 0 │
│ failed │ 4 │
│ delayed │ 0 │
│ paused │ 0 │
└───────────┴────────┘
from bull-repl.
@ptrkcsk maybe your failed jobs fail less than 24h ago?
from bull-repl.
it's not working for recently created jobs, but maybe it's because there's no finishedOn
date?
❯ date -u
Fri Jan 6 19:41:57 UTC 2023
❯ bull-repl
BULL-REPL> connect-to update-playlist
Connected to localhost:6379, prefix: bull, queue: update-playlist
BULL-REPL | bull.update-playlist> stats
┌───────────┬────────┐
│ (index) │ Values │
├───────────┼────────┤
│ waiting │ 0 │
│ active │ 1 │
│ completed │ 0 │
│ failed │ 0 │
│ delayed │ 0 │
│ paused │ 0 │
└───────────┴────────┘
BULL-REPL | bull.update-playlist> active
[
{
id: '1',
data: { id: 1 },
timestamp: 2023-01-06T19:39:57.086Z,
processedOn: 2023-01-06T19:39:57.087Z,
finishedOn: undefined,
name: '__default__',
failedReason: undefined,
stackTrace: [],
returnValue: null,
attemptsMade: 0,
delay: 0,
progress: 0
}
]
count: 1
BULL-REPL | bull.update-playlist> clean -s active -y 1d
Assuming yes for Clean
Jobs cleaned
BULL-REPL | bull.update-playlist> stats
┌───────────┬────────┐
│ (index) │ Values │
├───────────┼────────┤
│ waiting │ 0 │
│ active │ 1 │
│ completed │ 0 │
│ failed │ 0 │
│ delayed │ 0 │
│ paused │ 0 │
└───────────┴────────┘
BULL-REPL | bull.update-playlist>
from bull-repl.
You try to clean jobs, which created 24 hours ago
Try to pass 1m
for cleaning jobs, which created 1 minute ago
from bull-repl.
Related Issues (20)
- A proper format of command 'clean'. HOT 2
- Turn back -u option for connect in 0.x.x version HOT 6
- Explain the difference between 0.x and 1.x HOT 2
- Filter jobs list HOT 1
- ElastiCache clustercfg connection HOT 1
- Filter output to only show specific fields HOT 1
- The 'node-jq' is necessary? HOT 7
- Scripting: eg, clean all jobs from cron HOT 2
- `node-jq` package is quite strange - it calls `/bin/sh -c autoreconf -fi` when installing packages HOT 1
- Bug: Can't start bull-repl HOT 3
- Connection fails if HOST is not 127.0.0.1 using direct connect HOT 6
- Extend options for "add" command HOT 4
- `clean` command is not working HOT 1
- Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/bull-repl/node_modules/node-jq/…… HOT 2
- Upgrade bull dependency HOT 1
- --timeAgo option does not seem to be working (issue with jq module version) HOT 1
- Can't add new job - getting Object.fromEntries is not a function error HOT 2
- Allow tls rejectUnauthorized option in cli params HOT 1
- timeAgo does not work. Error: does not match format HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bull-repl.