Coder Social home page Coder Social logo

Comments (6)

ono avatar ono commented on September 2, 2024

I actually expected to get a request like this. The reason I just hardcoded 1000 for the initial value is not special. I just followed YAGNI principle: just waiting for someone like you who is really necessary to improve this since the current implementation works well to me and project I am involving.

So how do you want to do this? There are some approaches I can think of:

  • Change the default value to the higher value e.g. 5,000
  • Make the limiter value configurable e.g. environment variable or configuration file
  • Configurable on web interface

I actually don't have a good idea for the third one which provides the functionality 1. simply, 2. clear to someone new to resque-cleaner, 3. avoid a danger which a team staff set very high value without knowing the risk. Do you have any good idea?

I give my vote to environment variable.

from resque-cleaner.

shayfrendt avatar shayfrendt commented on September 2, 2024

@ono I'm down with YAGNI. It stands for You Are Gonna Need It, right? ;-)

My vote is setting up a configuration class - something like:

I feel like in the ruby community, a config block is probably more conventional then relying on/setting an environment variable (in an initializer, in the case of Rails applications).

I agree with your point about not allowing setting the limit on the web interface, especially if there are performance implications.

Whatchu think?

from resque-cleaner.

ono avatar ono commented on September 2, 2024

Thanks for your suggestion.

I think that resque-cleaner better follow Resque way if possible. I will also have a research how other popular resque plugins provide configuration and try to find a good way.

from resque-cleaner.

beerlington avatar beerlington commented on September 2, 2024

+1 for using a configuration class or something that can be done in code rather than setting an environmental variable.

from resque-cleaner.

ono avatar ono commented on September 2, 2024

Sorry for the delay. I've just pushed my change to master and released version 0.2.9.

https://github.com/ono/resque-cleaner#configuration

Thanks!

from resque-cleaner.

shayfrendt avatar shayfrendt commented on September 2, 2024

@ono Awesome - thanks!!

from resque-cleaner.

Related Issues (20)

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.