Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
a321404f
Commit
a321404f
authored
Oct 20, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused sidekiq worker
parent
e1fff018
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
43 deletions
+0
-43
app/workers/repository_archive_worker.rb
app/workers/repository_archive_worker.rb
+0
-43
No files found.
app/workers/repository_archive_worker.rb
deleted
100644 → 0
View file @
e1fff018
class
RepositoryArchiveWorker
include
Sidekiq
::
Worker
sidekiq_options
queue: :archive_repo
attr_accessor
:project
,
:ref
,
:format
def
perform
(
project_id
,
ref
,
format
)
@project
=
Project
.
find
(
project_id
)
@ref
,
@format
=
ref
,
format
.
downcase
repository
=
project
.
repository
repository
.
clean_old_archives
return
unless
file_path
return
if
archived?
||
archiving?
repository
.
archive_repo
(
ref
,
storage_path
,
format
)
end
private
def
storage_path
Gitlab
.
config
.
gitlab
.
repository_downloads_path
end
def
file_path
@file_path
||=
project
.
repository
.
archive_file_path
(
ref
,
storage_path
,
format
)
end
def
pid_file_path
@pid_file_path
||=
project
.
repository
.
archive_pid_file_path
(
ref
,
storage_path
,
format
)
end
def
archived?
File
.
exist?
(
file_path
)
end
def
archiving?
File
.
exist?
(
pid_file_path
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment