Commit graph

6 commits

Author SHA1 Message Date
Thong Kuah
a2cfc150ce Add # frozen_string_literal to spec/models
Adds `# frozen_string_literal: true` to spec/models ruby files
2019-04-01 14:37:54 +13:00
Jacopo
9000626a60 Moves Uniquify counter in the initializer 2018-04-19 13:56:37 +02:00
Jacopo
6ae3098eb8 Uses Uniquify to calculate Issue#suggested_branch_name 2018-04-19 13:56:37 +02:00
Rémy Coutable
ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Timothy Andrew
f2ed82fa84
Implement final review comments from @DouweM and @rymai
- Have `Uniquify` take a block instead of a Proc/function. This is more
  idiomatic than passing around a function in Ruby.

- Block a user before moving their issues to the ghost user. This avoids a data
  race where an issue is created after the issues are migrated to the ghost user,
  and before the destroy takes place.

- No need to migrate issues (to the ghost user) in a transaction, because
  we're using `update_all`

- Other minor changes
2017-02-24 16:50:20 +05:30
Timothy Andrew
8f01644ff4
Implement review comments from @rymai and @yorickpeterse
1. Refactoring and specs in the `Uniquify` class.

2. Don't use the `AdvisoryLocking` class. Similar functionality is
provided (backed by Redis) in the `ExclusiveLease` class.
2017-02-24 16:50:20 +05:30