summaryrefslogtreecommitdiff
path: root/app/observers
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-12 17:14:48 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-03-12 17:14:48 +0200
commit7f50c7f62c083ef5599b2ffe24723683c246bfb0 (patch)
treed86db3be7f7e32d2a00c5297bb84be7455b51682 /app/observers
parente603da7360dd8141a00b8096cb67acda0e039940 (diff)
downloadgitlab-ce-7f50c7f62c083ef5599b2ffe24723683c246bfb0.tar.gz
Move project creation to service
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/observers')
-rw-r--r--app/observers/project_observer.rb26
1 files changed, 1 insertions, 25 deletions
diff --git a/app/observers/project_observer.rb b/app/observers/project_observer.rb
index 4e3deec01bf..ad41ddad58f 100644
--- a/app/observers/project_observer.rb
+++ b/app/observers/project_observer.rb
@@ -1,30 +1,6 @@
class ProjectObserver < BaseObserver
def after_create(project)
- project.update_column(:last_activity_at, project.created_at)
-
- return true if project.forked?
-
- if project.import?
- RepositoryImportWorker.perform_in(5.seconds, project.id)
- else
- GitlabShellWorker.perform_async(
- :add_repository,
- project.path_with_namespace
- )
-
- log_info("#{project.owner.name} created a new project \"#{project.name_with_namespace}\"")
- end
-
- if project.wiki_enabled?
- begin
- # force the creation of a wiki,
- GollumWiki.new(project, project.owner).wiki
- rescue GollumWiki::CouldNotCreateWikiError => ex
- # Prevent project observer crash
- # if failed to create wiki
- nil
- end
- end
+ log_info("#{project.owner.name} created a new project \"#{project.name_with_namespace}\"")
end
def after_update(project)