/t/ - Meta

Site Discussion

Files (Max 3)
[New Post]

Happy Australia day

After editing the main.js with new global settings, how do I force it on all boards?
F.e. old thread limit was 100, now 50. But gulp and pm2 reload all and still some boards have more than 50 threads.
Even after creating a new post/thread on said board.
Replies: >>665
>>664 (OP) 
Hmmm, thats not handled yet. You would have to manually edit the database, it doesnt overwrite settings for each board on startup. Global limits means board owners cant exceed them when changing settings. Ill add this to my todo list thanks anon.

In mongo shell, you would do:
  'settings.threadLimit': {
    $gt: 50
}, {
  $set: {
    'settings.threadLimit': 50
});Then when a new thread is made, it will prune threads that exceed the new limit.
Alternatively if you just have a few boards, changing the thread limit in board settings down to 50 for each board will prune any extra threads.
Replies: >>671
Sadly did not work.
Mongo gives me an ok response and shows the number of items affected, but creating a new thread did not reset the total amout of threads to 50.
Replies: >>675
Ok weird, after I manually changed the total thread limit on a board via the web management, it changed it for every board.
Replies: >>675
I just did some more thinking, and it must be the boards cache in redis, so even changing the database didnt directly apply. Go to jschan folder and enter node console, then run require('./redis.js').deletePattern('board_*') its a small util that will remove all the cache entries with key starting with board_ which is the cached boards. Updating settings also updates the cache for that board.
Not sure what you are experiencing in >>673, definitely not happening here or my local instance.

4 replies | 0 files | 2 UIDs
Show Post Actions


Staff Actions:


- rules - faq - source code -