Fix queue details not loading - because of switch from node-redis to ioredis
I see you already have a PR for this #219 fixing issue #218 - but now you have another option.
Waiting for ioredis to implement this feature to fix this problem seems futile.
Looking at their code (below) it is not very advanced parsing only good enough to use the result when doing readyCheck.
In order for them to expose this API they they need to write new robust code and it seems like this is not prioritized and it is a bigger task than one off parsing for use in Arena. The risk of doing this in Arena is smaller since - since Arena use a list of allowed fields anyway, so any parsing errors will be hidden from the en user.
https://github.com/luin/ioredis/blob/master/lib/redis/index.ts#L558
const info: { [key: string]: any } = {};
const lines = res.split("\r\n");
for (let i = 0; i < lines.length; ++i) {
const [fieldName, ...fieldValueParts] = lines[i].split(":");
const fieldValue = fieldValueParts.join(":");
if (fieldValue) {
info[fieldName] = fieldValue;
}
}
Do you have an example that uses this feature?
Sorry for the late reply.
It fixes the regression with Redis statistics not being loaded after bullmq switched to ioredis.
At the moment it looks like this - note the "Could not retrieve value" - this is because arena can't read the result of client.info() the same way it could before (when bullmq relied on node-redis).
This issue: https://github.com/bee-queue/arena/issues/218

@bradvogel do you need a better example?
@oyvindneu Thanks for the ping and apologies for not responding before. Mind adding a quick unit test for this function?
@Rua-Yuki Mind taking a look at this? It's similar to your PR https://github.com/bee-queue/arena/pull/219.