@wmfs/tymly-pg-plugin
Version:
Replace Tymly's out-the-box memory storage with PostgreSQL
25 lines (20 loc) • 449 B
JavaScript
class Retiring {
init (stateConfig, options, callback) {
callback(null)
}
enter (tymly, data, callback) {
const ctx = tymly.ctx
console.log(' * Get comfy ' + ctx.petName + '...')
callback(null)
}
leave (tymly, data, callback) {
const ctx = tymly.ctx
console.log(' * ...see you in the morning, ' + ctx.petName)
callback(null)
}
}
module.exports = {
autoNudge: true,
stateClass: Retiring
}