From 330789c23c777d8ca646eba7c25f39cb7342cdee Mon Sep 17 00:00:00 2001 From: Alexander Randa Date: Thu, 27 Apr 2017 10:08:57 +0000 Subject: Implement web hooks logging * implemented logging of project and system web hooks * implemented UI for user area (project hooks) * implemented UI for admin area (system hooks) * implemented retry of logged webhook * NOT imeplemented log remover --- config/initializers/1_settings.rb | 5 ++++- config/routes/admin.rb | 6 ++++++ config/routes/project.rb | 6 ++++++ config/sidekiq_queues.yml | 3 +-- 4 files changed, 17 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index ea1815f500a..130bf3ef622 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -368,11 +368,14 @@ Settings.cron_jobs['gitlab_usage_ping_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['gitlab_usage_ping_worker']['cron'] ||= Settings.__send__(:cron_random_weekly_time) Settings.cron_jobs['gitlab_usage_ping_worker']['job_class'] = 'GitlabUsagePingWorker' -# Every day at 00:30 Settings.cron_jobs['schedule_update_user_activity_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['schedule_update_user_activity_worker']['cron'] ||= '30 0 * * *' Settings.cron_jobs['schedule_update_user_activity_worker']['job_class'] = 'ScheduleUpdateUserActivityWorker' +Settings.cron_jobs['remove_old_web_hook_logs_worker'] ||= Settingslogic.new({}) +Settings.cron_jobs['remove_old_web_hook_logs_worker']['cron'] ||= '40 0 * * *' +Settings.cron_jobs['remove_old_web_hook_logs_worker']['job_class'] = 'RemoveOldWebHookLogsWorker' + # # GitLab Shell # diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 48993420ed9..f6eb1086321 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -54,6 +54,12 @@ namespace :admin do member do get :test end + + resources :hook_logs, only: [:show] do + member do + get :retry + end + end end resources :broadcast_messages, only: [:index, :edit, :create, :update, :destroy] do diff --git a/config/routes/project.rb b/config/routes/project.rb index c786cbdee1e..b9543f7a39d 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -202,6 +202,12 @@ constraints(ProjectUrlConstrainer.new) do member do get :test end + + resources :hook_logs, only: [:show] do + member do + get :retry + end + end end resources :container_registry, only: [:index, :destroy], diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml index 0ca1f565185..93df2d6f5ff 100644 --- a/config/sidekiq_queues.yml +++ b/config/sidekiq_queues.yml @@ -44,9 +44,8 @@ - [project_cache, 1] - [project_destroy, 1] - [project_export, 1] - - [project_web_hook, 1] + - [web_hook, 1] - [repository_check, 1] - - [system_hook, 1] - [git_garbage_collect, 1] - [reactive_caching, 1] - [cronjob, 1] -- cgit v1.2.1