实训任务查询是否有username错误
This commit is contained in:
parent
6112c13b34
commit
2ff7c1f42b
|
@ -41,6 +41,18 @@ namespace :gitlab do
|
|||
end
|
||||
end
|
||||
|
||||
task :username => :environment do
|
||||
# projects = Project.where(:id => [6286, 6292, 6293, 6294])
|
||||
users = User.where("gid is not null")
|
||||
g = Gitlab.client
|
||||
# users = User.where(:gid => 8823)
|
||||
users.each do |user|
|
||||
if g.user(user.gid).try(:username) != user.login
|
||||
puts "start"+ "#{user.id}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "update user password"
|
||||
task :password => :environment do
|
||||
s = Trustie::Gitlab::Sync.new
|
||||
|
|
Loading…
Reference in New Issue