Open jonnyarnold opened 9 years ago
There is a Slack bot that does this. I think there's value in having a GitHub bot for it too.
@lpil Samuel currently always reacts to events, but this seems to be something we want to check regularly.
How do we get a regular task into Samuel?
Through OTP! There's a nice library that abstracts this away for you. https://github.com/c-rack/quantum-elixir
How do we ensure Samuel will stay awake on Heroku?
You can't really.
Alternatively Samuel could perform this check after a callback wakes him up.
Ooo, Heroku has a scheduler, looks like the right thing to use.
You're adding a hard dependancy on Heroku and adding a web interface for jobs when you're using a programming language that gives you this out of the box? What's the reasoning here?
It would be trivial to build this with a GenServer and Process.send_after/3
.
Oh wait, is this to ensure he's awake?
I'm gonna get Heroku Scheduler to run a Mix task; this will ensure he wakes up.
It doesn't actually wake him up, it spins up a second dyno
Build a Mix task like run_daily_checks
, and get Heroku Scheduler to run it every day. I know it doesn't use the stuff Elixir provides, but it's a thin wrapper and I don't see a way around Heroku's dyno spin-down. We can have a look at non-Heroku deployments as well?
It's probably the easiest way to do it. Just have it call some job module that you could reuse in an periodic process.
Old pull requests are hard to merge and usually have been forgotten about. Every week the pull request is opened, Samuel should get increasingly irate. Perhaps he should close the PR after a certain time?