You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the cart cleanup job (which removes all anonymous carts over X days) starts, it crashes with this error:
Exception in setTimeout callback: TypeError: moment is not a function
at JobQueue.Jobs.processJobs [as worker] (imports/plugins/included/jobcontrol/server/jobs/cleanup.js:36:23)
at JobQueue._process (/Users/brenthoover/Projects/js/reaction/node_modules/@reactioncommerce/job-queue/dist/common/jobFactory.js:432:23)
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
at packages/meteor.js:620:25
at runWithEnvironment (packages/meteor.js:1356:24)
Steps to Reproduce
In the Dashboard in Shops/Options set the cleanup duration to a very short period.
Wait
Observe the error
Possible Solution
With the way that carts are created now it may no longer be necessary to have this function but I am not sure.
This error probably has to do with someone trying to lazyload moment which is entirely not necessary on the server-side, which is where this code lives.
Versions
Reaction: 2.0.0-rc5
The text was updated successfully, but these errors were encountered:
@jeffcorpuz and I had looked at this error awhile back. Not sure if he created an issue for it at the time. I believe moment is being used for something easy and we could just not use moment at all. In 2.0 carts are deleted when they become orders or when you log in and they get merged into an account cart. But it seems like users would still want a cleanup job for eventually deleting abandoned carts, which is what I think this is for.
Issue Description
When the cart cleanup job (which removes all anonymous carts over X days) starts, it crashes with this error:
Steps to Reproduce
Possible Solution
With the way that carts are created now it may no longer be necessary to have this function but I am not sure.
This error probably has to do with someone trying to lazyload moment which is entirely not necessary on the server-side, which is where this code lives.
Versions
Reaction: 2.0.0-rc5
The text was updated successfully, but these errors were encountered: