summaryrefslogtreecommitdiff
path: root/app/workers/group_destroy_worker.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-02-191-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-091-1/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-181-0/+2
|
* Enable frozen string literals for app/workers/*.rbgfyoung2018-06-271-0/+2
|
* Remove soft removals related codeYorick Peterse2018-01-081-1/+1
| | | | | | | | | | | | | | This removes all usage of soft removals except for the "pending delete" system implemented for projects. This in turn simplifies all the query plans of the models that used soft removals. Since we don't really use soft removals for anything useful there's no point in keeping it around. This _does_ mean that hard removals of issues (which only admins can do if I'm not mistaken) can influence the "iid" values, but that code is broken to begin with. More on this (and how to fix it) can be found in https://gitlab.com/gitlab-org/gitlab-ce/issues/31114. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
* Add ApplicationWorker and make every worker include itDouwe Maan2017-12-051-2/+1
|
* Enable 5 lines of Sidekiq backtrace lines to aid in debuggingsh-sidekiq-backtraceStan Hu2017-08-251-0/+1
| | | | | | | | | | Customers often have Sidekiq jobs that failed without much context. Without Sentry, there's no way to tell where these exceptions were hit. Adding in additional lines adds a bit more Redis storage overhead. This commit adds in backtrace logging for workers that delete groups/projects and import/export projects. Closes #27626
* Revert "Merge branch 'sh-sidekiq-backtrace' into 'master'"Robert Speicher2017-08-251-1/+0
| | | This reverts merge request !13813
* Enable 5 lines of Sidekiq backtrace lines to aid in debuggingStan Hu2017-08-241-0/+1
| | | | | | | | | | Customers often have Sidekiq jobs that failed without much context. Without Sentry, there's no way to tell where these exceptions were hit. Adding in additional lines adds a bit more Redis storage overhead. This commit adds in backtrace logging for workers that delete groups/projects and import/export projects. Closes #27626
* Fix inconsistent naming for services that delete thingsdixpac2017-02-081-1/+1
| | | | | | * Changed name of delete_user_service and worker to destroy * Move and change delete_group_service to Groups::DestroyService * Rename Notes::DeleteService to Notes::DestroyService
* Re-organize queues to use for Sidekiqseparate-sidekiq-queuesYorick Peterse2016-10-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Dumping too many jobs in the same queue (e.g. the "default" queue) is a dangerous setup. Jobs that take a long time to process can effectively block any other work from being performed given there are enough of these jobs. Furthermore it becomes harder to monitor the jobs as a single queue could contain jobs for different workers. In such a setup the only reliable way of getting counts per job is to iterate over all jobs in a queue, which is a rather time consuming process. By using separate queues for various workers we have better control over throughput, we can add weight to queues, and we can monitor queues better. Some workers still use the same queue whenever their work is related. For example, the various CI pipeline workers use the same "pipeline" queue. This commit includes a Rails migration that moves Sidekiq jobs from the old queues to the new ones. This migration also takes care of doing the inverse if ever needed. This does require downtime as otherwise new jobs could be scheduled in the old queues after this migration completes. This commit also includes an RSpec test that blacklists the use of the "default" queue and ensures cron workers use the "cronjob" queue. Fixes gitlab-org/gitlab-ce#23370
* Fix bug where destroying a namespace would not always destroy projectsStan Hu2016-08-111-0/+17
There is a race condition in DestroyGroupService now that projects are deleted asynchronously: 1. User attempts to delete group 2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project 3. DestroyGroupService destroys the Group, leaving all its projects without a namespace 4. Projects::DestroyService runs later but the can?(current_user, :remove_project) is `false` because the user no longer has permission to destroy projects with no namespace. 5. This leaves the project in pending_delete state with no namespace/group. Projects without a namespace or group also adds another problem: it's not possible to destroy the container registry tags, since container_registry_path_with_namespace is the wrong value. The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService. Closes #17893