Comments (6)
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.
@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.
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.
+1 for using a configuration class or something that can be done in code rather than setting an environmental variable.
from resque-cleaner.
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.
@ono Awesome - thanks!!
from resque-cleaner.
Related Issues (20)
- cleaner tab broken when there is bad failed job HOT 1
- resque web integration - no tab showing? HOT 2
- Requeue-ing failed jobs with args/cleaning failed jobs with no args HOT 1
- total page number and current range numbers are 1 off HOT 1
- css not showing up HOT 1
- help testing against edge Resque HOT 3
- resque 2.0 support HOT 1
- support for resque 2.0 HOT 1
- require resque-cleaner error HOT 2
- Class with slashes causes Bad Request error HOT 1
- Notes for Resque 2.0 HOT 4
- ResqueCleaner#requeue not working HOT 2
- Form for cleaner_exec not aware of used regex filter HOT 2
- Error on old version of Sinatra HOT 7
- setup via resque web engine? HOT 6
- ActionController::RoutingError (No route matches [GET] "/resque/cleaner/public/cleaner.css") HOT 2
- Status of the project HOT 1
- JSON Error on Dump HOT 5
- Find slow jobs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resque-cleaner.