reevoo / samuel

That is a tasty pull request.
Other
4 stars 0 forks source link

Comment on any pull request older than a week. #14

Open jonnyarnold opened 9 years ago

jonnyarnold commented 9 years ago

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?

jonnyarnold commented 8 years ago

There is a Slack bot that does this. I think there's value in having a GitHub bot for it too.

jonnyarnold commented 8 years ago

@lpil Samuel currently always reacts to events, but this seems to be something we want to check regularly.

lpil commented 8 years ago

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.

jonnyarnold commented 8 years ago

Ooo, Heroku has a scheduler, looks like the right thing to use.

lpil commented 8 years ago

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.

lpil commented 8 years ago

Oh wait, is this to ensure he's awake?

jonnyarnold commented 8 years ago

I'm gonna get Heroku Scheduler to run a Mix task; this will ensure he wakes up.

lpil commented 8 years ago

It doesn't actually wake him up, it spins up a second dyno

jonnyarnold commented 8 years ago

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?

lpil commented 8 years ago

It's probably the easiest way to do it. Just have it call some job module that you could reuse in an periodic process.