Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Support object progress #14

Closed
melalj opened this issue Jun 25, 2021 · 8 comments
Closed

Support object progress #14

melalj opened this issue Jun 25, 2021 · 8 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@melalj
Copy link

melalj commented Jun 25, 2021

I keep getting a rendering error when the job progress is an object { "percents:" 100, "currentStep": "finished" }:

Error: Int cannot represent non-integer value: { percents: 100, currentStep: "finished" }: {"response":{"errors":[{"message":"Int cannot represent non-integer value: { percents: 100, currentStep: \"finished\" }","locations":[{"line":5,"column":5}],"path":["jobs",0,"progress"],"extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"message":"Int cannot represent non-integer value: { percents: 100, currentStep: \"finished\" }"}...

Maybe it should be a way to with discard the progress, or be able to have an option to map the int value with the right key

@s-r-x
Copy link
Owner

s-r-x commented Jun 25, 2021

are you using bullmq? i'm asking because bull always returns progress as a number(if the docs are correct). this api/ui is made specifically for bull

@s-r-x s-r-x closed this as completed Jul 5, 2021
@fritx
Copy link

fritx commented Feb 27, 2022

+1 same error here. bullmq supports object progress @s-r-x

image

image

@fritx
Copy link

fritx commented Feb 27, 2022

awesome work btw! I'm also willing to provide PR as well

@s-r-x
Copy link
Owner

s-r-x commented Feb 28, 2022

@fritx hmm, i have no idea why graphql throws an error on this one, because bull-monitor api always converts job progress to 0, if one is not a number.
btw since we support bullmq now, non standard object progress should be pretty easy to implement: we just need to change its gql type to string and implement serialization.

@s-r-x s-r-x reopened this Feb 28, 2022
@s-r-x s-r-x added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Feb 28, 2022
@fritx
Copy link

fritx commented Feb 28, 2022

image

I'm ready to provide a PR, here is a screenshot, is it acceptable? @s-r-x

@s-r-x
Copy link
Owner

s-r-x commented Feb 28, 2022

@fritx LGTM

@s-r-x
Copy link
Owner

s-r-x commented Mar 2, 2022

added in 3.5.0

@s-r-x s-r-x closed this as completed Mar 2, 2022
@s-r-x
Copy link
Owner

s-r-x commented Mar 2, 2022

@fritx bullmq support for the cli was added in 4.1.0 (there is a new "bullmq" flag)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants