diff options
author | Toon Claes <toon@iotcl.com> | 2017-08-18 11:02:46 +0300 |
---|---|---|
committer | Toon Claes <toon@iotcl.com> | 2017-08-22 15:31:40 +0300 |
commit | d4e5ac1bed844210df089862b234ffb0ff3854f7 (patch) | |
tree | cee14d82299b2f4ea0bed787dd32a73239ed7d2a /app | |
parent | 2074f39a47645b5ea453adfba84247f2fcc4f3c7 (diff) |
Use EachBatch concern to loop over batches
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/namespaceless_project_destroy_worker.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/workers/namespaceless_project_destroy_worker.rb b/app/workers/namespaceless_project_destroy_worker.rb index b148e7082b3..1cfb0be759e 100644 --- a/app/workers/namespaceless_project_destroy_worker.rb +++ b/app/workers/namespaceless_project_destroy_worker.rb @@ -19,7 +19,7 @@ class NamespacelessProjectDestroyWorker return end - return if namespace?(project) # Reject doing anything for projects that *do* have a namespace + return if project.namespace # Reject doing anything for projects that *do* have a namespace project.team.truncate @@ -30,10 +30,6 @@ class NamespacelessProjectDestroyWorker private - def namespace?(project) - project.namespace_id && Namespace.exists?(project.namespace_id) - end - def unlink_fork(project) merge_requests = project.forked_from_project.merge_requests.opened.from_project(project) |