Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Agenda 4.2.1 produces an error on Agendash when rescheduling a job #191

Closed
mg-83 opened this issue Aug 12, 2021 · 11 comments
Closed

Comments

@mg-83
Copy link

mg-83 commented Aug 12, 2021

With the latest Version of Agendash there is an error (404 should be 500) thrown, when trying to do a reschedule on a job. It's working with Agenda 4.1.3 and 4.2.0 without problems.

@mg-83 mg-83 changed the title [Bug] Agenda 4.2.1 produces an error on Agendash when Rescheduling a job [Bug] Agenda 4.2.1 produces an error on Agendash when rescheduling a job Aug 12, 2021
@harisvsulaiman harisvsulaiman transferred this issue from agenda/agenda Aug 12, 2021
@Nefsen402
Copy link
Contributor

Nefsen402 commented Aug 12, 2021

Hmm, it looks like anything both requeing or deleting jobs are affected. I drilled down into the issue, and it looks like the pkFactory is not a function anymore, but instead an object with an additional createPk function as a property. Agendash is assuming that pkFactory is a function and failing whenever it tries to modify or delete a job.

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

Here are the two references to the broken function.

Edit: I am having this issue with version 4.1.3 of Agenda which you mentioned was ok...
Edit again: No, I'm just jumping the gun, I was looking at package.json instead of package-lock.json. It indeed works on both versions you mentioned.

@nealoke
Copy link

nealoke commented Aug 21, 2021

When trying to reschedule a job in the UI you will get a 404 indeed. Quite blocking :(

image

@VadymKultenkoDarth
Copy link

VadymKultenkoDarth commented Sep 2, 2021

Same here error 404 not found.

TypeError: collection.s.pkFactory is not a function

@ljacho
Copy link
Contributor

ljacho commented Sep 10, 2021

It doesn't work

Hmm, it looks like anything both requeing or deleting jobs are affected. I drilled down into the issue, and it looks like the pkFactory is not a function anymore, but instead an object with an additional createPk function as a property. Agendash is assuming that pkFactory is a function and failing whenever it tries to modify or delete a job.

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

_id: { $in: jobIds.map((jobId) => collection.s.pkFactory(jobId)) },

Here are the two references to the broken function.

Edit: I am having this issue with version 4.1.3 of Agenda which you mentioned was ok...
Edit again: No, I'm just jumping the gun, I was looking at package.json instead of package-lock.json. It indeed works on both versions you mentioned.

can you confirm it works for you with older versions please?

@ljacho
Copy link
Contributor

ljacho commented Sep 10, 2021

Agenda is using new mongodb driver now, see ObjectId

fix: #193

@Shahor
Copy link

Shahor commented Jan 7, 2022

Is there anything planned to make this move forward?

@Shahor
Copy link

Shahor commented Jan 7, 2022

@santiq Sorry for pinging you directly but you seem to be the most active contributor.
Can you help on this maybe?

@GimpMaster
Copy link

Noticing this issue now. Following to see if it ever gets fixed. Otherwise Agendash is effectively a read-only tool now.

@scottbasgaard
Copy link

Same here.

@VadymKultenkoDarth
Copy link

VadymKultenkoDarth commented Jan 25, 2022 via email

@koresar
Copy link
Contributor

koresar commented Jan 31, 2022

Merged the PR. Expect v3.0.0 soon.

@koresar koresar closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants