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

Synching up to changes made in agenda 0.7.2. #17

Merged
merged 2 commits into from
Dec 10, 2015
Merged

Conversation

3choBoomer
Copy link
Contributor

-Added better error checking in constructor.

Agenda 0.7.2 renamed _db to _collection to better match what the variable actually holds.

-Added better error checking in constructor.
@esteban-uo
Copy link

@3choBoomer thanks!, @moudy can you please merge this? thanks!

@niftylettuce
Copy link

@moudy @esteban-uo @3choBoomer can you please merge this?

@liamdon
Copy link

liamdon commented Nov 25, 2015

👍

@niftylettuce
Copy link

@liamdon Hey Liam 😄 nice to see you here! Hope ClassDojo is going well.

@niftylettuce
Copy link

There is only one working use case with this pull request:

var agenda = new Agenda({ mongo: myMongoClientConnection });

This does not work:

var agenda = new Agenda({ db: { address: myDBURIString, collection: 'agendaJobs'} });

@3choBoomer can we get this patched to support this usage too?

@niftylettuce
Copy link

This is the error we get if we don't use mongo as an option:

  if (!agenda._collection) {throw new Error('_collection is undefined. Check a
                                  ^
Error: _collection is undefined. Check agenda config.
    at new module.exports (/Users/niftylettuce/Public/agenda-ui-test/node_modules/agenda-ui/lib/store.js:6:35)
    at module.exports (/Users/niftylettuce/Public/agenda-ui-test/node_modules/agenda-ui/lib/api.js:6:15)
    at module.exports (/Users/niftylettuce/Public/agenda-ui-test/node_modules/agenda-ui/index.js:38:11)
    at Object.<anonymous> (/Users/niftylettuce/Public/agenda-ui-test/agenda-ui.js:22:9)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)

@pmettraux
Copy link

need that one to be merged please

@pruhstal
Copy link

+1, please merge :)

@jeonghwan-kim
Copy link

+1, merge please

Having this check breaks other ways of creating Agenda instances.
@3choBoomer
Copy link
Contributor Author

@niftylettuce done.

@niftylettuce
Copy link

thanks, just needs merged now

@3choBoomer
Copy link
Contributor Author

we need @moudy to do that.

@moudy
Copy link
Owner

moudy commented Dec 10, 2015

@3choBoomer sorry just seeing this now, thanks!

moudy added a commit that referenced this pull request Dec 10, 2015
Synching up to changes made in agenda 0.7.2.
@moudy moudy merged commit efa0e14 into moudy:master Dec 10, 2015
@moudy
Copy link
Owner

moudy commented Dec 10, 2015

@3choBoomer having trouble getting the project to build so can't publish to NPM yet... will try to find time to debug soon.

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

Successfully merging this pull request may close these issues.

None yet

8 participants