GithubHelp home page GithubHelp logo

Comments (7)

orliesaurus avatar orliesaurus commented on July 19, 2024 1

Hey, @patcon

I don't understand the problem because (luckily) I don't use Heroku. I added Heroku because it makes it so much simpler for people to use this slackbot.

Wouldn't the best advice just create a new Heroku account that has no other apps running alongside it?
Alternatively, moving this to a web-process would force the bot to sleep - so that would break it?

from greetingslack.

gundmc avatar gundmc commented on July 19, 2024 1

I think this is a result of choosing to use the Slack RTM api instead of the Events and Web API.

I found this repo from a Medium article while looking for this type of functionality for a hobby-related Slack. Really cool stuff and a great idea!

To get around the worker always running issue, I ended up converting to the web api and running as a Cloud Function on GCP. That way, you subscribe to certain events in slack and the function only executes when the event is triggered - no servers/workers. Has worked really well so far!

Happy to discuss implementation with you guys if desired. Thanks for the inspiration!

from greetingslack.

patcon avatar patcon commented on July 19, 2024

You're right, that would totally be a partial work-around for some of my very specific woes :)

but I feel there's perhaps another rationale for having this app work a bit more intuitively within heroku users' assumptions: if someone isn't paying, then they should expect sleep happen, right? If they don't want it to sleep, then they should knowingly start paying, instead of having this app take them into a countdown of "heroku dyno debt" through a bit of a work-around. Even with a separate account, the approach here invites users to run a 24 hour worker dyno (that can't intelligently sleep) without paying, and so 3 weeks into using the bot (at perhaps about the time that people start trusting and depending on it), heroku shuts down the app due to overage, and the bot (perhaps unknowingly) goes down, and breaks their onboarding. This seems like a bad thing to set people up for, no? :)

At least with a web dyno, people can think on using something like https://github.com/hubot-scripts/hubot-heroku-keepalive, and keep itself awake during certain hours (when people most often use slack).

tl;dr - current setup just defers dealing with the dyno restrictions in an overly clever way that sets people up for later difficulty :)

from greetingslack.

orliesaurus avatar orliesaurus commented on July 19, 2024

@patcon Ok - I never had a complaint from any of the people that run the bot.
I have a friend who runs a community for podcasters whose bot has been running for 3 months without shutting down.
I understand the issue better now at least.
Maybe if I fork the project and make it behave as a web-dyno version then this would overcome the issue you mentioned.
The other solution is to pay Heroku fees...
#foodforthought
Not sure what's the path to take here...

from greetingslack.

patcon avatar patcon commented on July 19, 2024

Totally. I'm willing to work on a solution too, so not all on you. i expect to be back into onboarding process mode at some point, and would be happy to loop back to convo then!

(fwiw, due to how heroku tallies dyno hours in aggregate, someone with a bunch of heroku apps might see the "debt" of this app masked by surplus hours on other quiet apps. at least that's my analysis of the situation :)

from greetingslack.

orliesaurus avatar orliesaurus commented on July 19, 2024

@gundmc great to hear: this bot was written many years ago, there was no event api back then, it would be cool to see others update the code or create their own now that it is possible and just like you did use serverless platforms with hooks

from greetingslack.

patcon avatar patcon commented on July 19, 2024

I'd love to check out that code @gundmc! Are you planning to release in another project? :)

from greetingslack.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.