diff options
author | Stan Hu <stanhu@gmail.com> | 2016-07-27 19:36:49 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-07-28 09:40:01 -0700 |
commit | 230f6910135f4449b5b5e83867922bf2580ba655 (patch) | |
tree | bce92b3ca99fcda32a075d001452d045c66e480f /app/models/project.rb | |
parent | 17be364d072298f42d77fd22189bf9289b7cda2e (diff) | |
download | gitlab-ce-230f6910135f4449b5b5e83867922bf2580ba655.tar.gz |
Add a log message when a project is scheduled for destruction for debugging
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index b3703d71e72..71c590582ca 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1157,7 +1157,10 @@ class Project < ActiveRecord::Base def schedule_delete!(user_id, params) # Queue this task for after the commit, so once we mark pending_delete it will run - run_after_commit { ProjectDestroyWorker.perform_async(id, user_id, params) } + run_after_commit do + job_id = ProjectDestroyWorker.perform_async(id, user_id, params) + Rails.logger.info("User #{user_id} scheduled destruction of project #{path_with_namespace} with job ID #{job_id}") + end update_attribute(:pending_delete, true) end |