mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
notes on where to implement cron (store.createModel() not working)
This commit is contained in:
parent
3a3829bb10
commit
13a8172655
1 changed files with 10 additions and 1 deletions
|
|
@ -52,6 +52,15 @@ expressApp.all '*', (req) ->
|
|||
|
||||
derby.use(require 'racer-db-mongo')
|
||||
|
||||
app.createStore
|
||||
store = app.createStore
|
||||
listen: server
|
||||
db: {type: 'Mongo', uri: 'mongodb://localhost/habitrpg'}
|
||||
|
||||
# Would implement cron here, using node-cron & https://github.com/codeparty/derby/issues/99#issuecomment-6596460
|
||||
# But it's not working
|
||||
# cronJob = require("cron").CronJob
|
||||
# model = store.createModel()
|
||||
# new cronJob("* * * * * *", ->
|
||||
# model.get() #TODO this returns {}, can't seem to access the data
|
||||
# , null, true, "America/Los_Angeles")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue