msavin / SteveJobs

A simple jobs queue that just works (for Meteor.js)
Other
207 stars 35 forks source link

Jobs.clear(state, name) is failing - TypeError: Cannot read property 'remove' of undefined #66

Closed ScottAgirs closed 5 years ago

ScottAgirs commented 6 years ago

I am trying to remove Jobs from queue with the .clear method, but it is failing with the error (screenshot below)

Here is the snippet I use:

import { Jobs } from "meteor/msavin:sjobs";

var state = "failure";
var name = "poToTeacher"; // this name is the value in database
Jobs.clear(state, name);
..

screen shot 2018-09-25 at 16 07 58

msavin commented 5 years ago

@ScottAgirs thanks for reporting this - should be fixed in 3.1. If it persists, please let me know.

OliverColeman commented 5 years ago

Just updated to 3.1.1, still seeing this issue. I'm calling Jobs.clear('success'); I seem to have three collections for Jobs: db.jobs_data, db.jobs_dominator, db.jobs_dominator_3.