Hubot Brain not loading? #1716
-
I'm working on adding cron jobs to our installation of Hubot. I found this plugin and decaffeinated it. So far, so good, right? Well...I did run in to some issues with the plugin as it was initially implemented, so I ended up re-writing some parts of it. But you know what? It still works! And most of my changes were removing complexity, so it's actually a bit easier to read! Neat! Here's the issue: I can't get the plugin to load data written to a Redis brain at start up. I've tried What's interesting is that crons are successfully written to the brain, so I know there should be data loaded. Example of brain data:
actual code
(also, sorry for using this repo as a tech support channel, but I'm not really sure where else to ask Hubot questions like this...) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Here's one of the places where Try changing robot.brain.on('running', robot => {
loadJobs(robot)
}) to robot.brain.on('loaded', data => {
loadJobs(robot)
}) |
Beta Was this translation helpful? Give feedback.
-
The answer! We don't need a function for this step:
Now I'm actually successfully loading messages! Thanks for the help @joeyguerra |
Beta Was this translation helpful? Give feedback.
The answer!
We don't need a function for this step:
Now I'm actually successfully loading messages!
Thanks for the help @joeyguerra