Fix project destroy timeout from admin area. Added 30 ssh keys to dev seeds

This commit is contained in:
Dmitriy Zaporozhets 2012-12-30 14:09:43 +02:00
parent a16533a04a
commit f45345edb3
2 changed files with 17 additions and 8 deletions

View file

@ -35,6 +35,9 @@ class Admin::ProjectsController < AdminController
end end
def destroy def destroy
# Delete team first in order to prevent multiple gitolite calls
@project.truncate_team
@project.destroy @project.destroy
redirect_to admin_projects_path, notice: 'Project was successfully deleted.' redirect_to admin_projects_path, notice: 'Project was successfully deleted.'

View file

@ -1,8 +1,14 @@
Key.seed(:id, [
{ Gitlab::Seeder.quiet do
id: 1, User.first(30).each_with_index do |user, i|
title: "Sample key", Key.seed(:id, [
key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=", {
user_id: 1, id: i,
} title: "Sample key #{i}",
]) key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt#{i + 100}6k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
user_id: user.id,
}
])
puts "SSH KEY ##{i} added.".green
end
end