Closed kumarmanishc closed 3 weeks ago
It do work for me... Weird, there is a limit of the underline lib(bull / bullmq) of 1000 at a time... Does your failed queue counter decrease by 1000?
hi @smoothdvd,
can you make a small repo that recreates your issue? I've tried the empty function locally, it works as expected.
Can you check the queue name, maybe there is some issue with the path (which includes the queue name).
Make sure that you are using the correct queue adapter (for bullmq, use BullmqAdapter
)
I'm more than happy to try to debug it with you, I'm available on Discord, felixmosh
@felixmosh Sorry, it's my fault. Using BullAdapter on bullMQ queue.
@felixmosh I tried even with less than 100 jobs something migh be wrong with queue system.
Have created queue like this export const queue1 = new Queue(QueueName.Queue1, { connection: redisConnection }); export const Queue2 = new Queue(QueueName.Queue2, { connection: redisConnection });
Just added this scenario :]
@felixmosh Sorry, it's my fault. Using BullAdapter on bullMQ queue.
@felixmosh I tried even with less than 100 jobs something migh be wrong with queue system.
Have created queue like this export const queue1 = new Queue(QueueName.Queue1, { connection: redisConnection }); export const Queue2 = new Queue(QueueName.Queue2, { connection: redisConnection });
can you make a small repo that recreated that issue?
Hi, interested in the solution. I have the same problem
@CyrilCartoux can you make a small reproduction repo?
@CyrilCartoux can you make a small reproduction repo?
I will :)
@CyrilCartoux can you make a small reproduction repo?
Felix I have created the repo ;) Let me know if any questions! https://github.com/CyrilCartoux/bull-board-807
Thank you @CyrilCartoux, I've managed to reproduce your issue.
The problem is that you are using a BullAdapter
instead of BullMQAdapter
, with bullMQ
lib.
Maybe it is time for me to stop this shananigan... and throw an Exception.
(I've tested the change, and it works)
Damn you're right !
Sorry about that! And thanks a lot for the fast replies!! Keep up the good work mate we use a lot your package ;)
I have the same issue. I'm using nestjs like this:
// part of app.module
BullModule.forRootAsync({
imports: [ConfigModule],
useFactory: (configService: ConfigService<IConfiguration>) => ({
redis: {
host: configService.get('redis.host', { infer: true }),
port: configService.get('redis.port', { infer: true }),
username: configService.get('redis.username', { infer: true }),
password: configService.get('redis.password', { infer: true }),
...(configService.get('redis.tls', { infer: true }) ? { tls: {} } : {}),
retryStrategy: (times) => (times > 3 ? undefined : 5000),
},
}),
inject: [ConfigService],
}),
BullBoardModule.forRootAsync({
imports: [ConfigModule],
useFactory: (configService: ConfigService<IConfiguration>) => ({
route: '/queues',
adapter: ExpressAdapter,
middleware: (req, res, next) => {
const authHeader = req.headers.authorization || '';
const [authType, credentials] = authHeader.split(' ');
if (authType === 'Basic' && credentials) {
const decoded = Buffer.from(credentials, 'base64').toString('utf8');
const [inputUsername, inputPassword] = decoded.split(':');
if (
inputUsername === configService.get('bull.dashboard.username', { infer: true }) &&
inputPassword === configService.get('bull.dashboard.password', { infer: true })
) {
return next();
}
}
res.setHeader('WWW-Authenticate', 'Basic realm="Bull Dashboard"');
res.status(401).send('Authentication required.');
},
}),
inject: [ConfigService],
}),
And for example FileModule
:
@Module({
imports: [
TypeOrmModule.forFeature([FileEntity, BoughtCourseEntity, CourseEntity]),
UploadModule,
BullModule.registerQueue({ name: videoMetadataQueue }, { name: tempFilesQueue }),
BullBoardModule.forFeature(
{
name: videoMetadataQueue,
adapter: BullMQAdapter,
},
{
name: tempFilesQueue,
adapter: BullMQAdapter,
},
),
],
providers: [FileService, VideoMetadataProcessor, TempFilesProcessor],
controllers: [FileController],
exports: [FileService],
})
export class FileModule {}
I can remove a single job but not all of them. Any ideas?
Are you using bull or bullmq?
I'm using bullmQ
On Wed, 16 Oct 2024 at 10:13, Felix Mosheev @.***> wrote:
Are you using bull or bullmq?
— Reply to this email directly, view it on GitHub https://github.com/felixmosh/bull-board/issues/807#issuecomment-2415719409, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBBA27QYOSRJZ36HWA4PQ3Z3XVGRAVCNFSM6AAAAABNQGW3X2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVG4YTSNBQHE . You are receiving this because you authored the thread.Message ID: @.***>
-- Manish Kumar Chaubey
Email : @.***
LinkedIn : https://www.linkedin.com/in/kumarmanishc
Medium : https://kumarmanishc.medium.com/
Twitter : https://www.twitter.com/kumarmanishc
Are you using the correct queue adapter?
I refactored my code from using bull
to bullmq
and it seems to work, at least the option clean all
, while empty
option on the right does not work - any ideas why? Earlier there was an error internal server error
but now there is no error but no action as well
I'm not sure, without a reproduction repo I can't help much...
Thank you @CyrilCartoux, I've managed to reproduce your issue. The problem is that you are using a
BullAdapter
instead ofBullMQAdapter
, withbullMQ
lib.Maybe it is time for me to stop this shananigan... and throw an Exception.
(I've tested the change, and it works)
Hi, it would be great Because its not obviously. Exception in this flow is a good solution.
Added queue <-> adapter compatebility, use v6.3.2
Thank you for this awesome package.. As of #39 we have a feature to remove all failed jobs.
That's not working It's requesting to the following endpoints but not working at all with empty response
How to produce ?
It's showing the clean all button. Once user clicks on that it's making request to the following URL PUT: Request with empty response] http://localhost:3000/bullmq/api/queues/**queue_name**/clean/failed
Note: However Individual remove request is working but it's difficult to remove jobs individually