Redmine code cleaning for config.threadsafe!

Added by Numa Schmeder over 4 years ago


I am new to redmine. I had to deploy it on tomcat server with Jruby. After reading the documentation and being able to make it work correctly in Tomcat, I started optimization. I found out that I had to enable config.threadsafe! And this when my problems started. After reading and a lot of trial and error, I spent a lot of time cleaning and adding the dependency correctly to all files. I finally met my goal to make red mine work in config.threadsafe! mode with no crash.
I changed nonetheless more then 40 files, configure the initialization to load eagerly correctly all necessary folders in plugins and lib/plugins. Most of the work was done to add correct dependency and some code correction as well (mostly typos).
For example require corrections in /app/helpers/application_helper.rb the following dependency were missing:
require 'redmine/pagination'
require 'redmine/I18n'
require 'redmine/wiki_formatting'
require 'gravatar'

For example code correction in fpdf_eps.rb:
changed all cases to use the "then" keyword instead of the ":"

I thought my work could by useful to the redmine project. I just wanted to know how if you are interested and how I could contribute back all the changes I made.

Don't hesitate to contact me directly.



Replies (1)

RE: Redmine code cleaning for config.threadsafe! - Added by Bruno Medeiros about 4 years ago

There's a ticket about it: #12097

I don't have problems with it, but I think a patch will be welcome there.