Usage of `ChronicDuration` is not thread-safe

Time conversion values are stored as class variables and we're switching them in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/time_tracking_formatter.rb#L27.

This could lead to problems when multiple threads are changing the same class variable.

Since it looks like the gem is unmaintained and it's only a single class, it may be good to just copy this class over in lib/ and change it. I think we can change this implementation to use an instance where we pass the config values in the constructor.

Edited Sep 03, 2019 by Kamil Trzciński
Assignee Loading
Time tracking Loading