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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
bacd2c4f
Commit
bacd2c4f
authored
Jun 15, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some refactoring - renaming things, etc..
parent
36ccaca3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
app/models/project.rb
app/models/project.rb
+3
-3
app/workers/gitlab_remove_project_export_worker.rb
app/workers/gitlab_remove_project_export_worker.rb
+2
-2
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+3
-3
No files found.
app/models/project.rb
View file @
bacd2c4f
...
...
@@ -350,8 +350,8 @@ class Project < ActiveRecord::Base
end
# Deletes gitlab project export files older than 24 hours
def
archi
ve_gitlab_exports!
Gitlab
::
Popen
.
popen
(
%W(find
#{
export_path
}
-not -path
#{
export
_path
}
-mmin +1440 -delete)
)
def
remo
ve_gitlab_exports!
Gitlab
::
Popen
.
popen
(
%W(find
#{
Gitlab
::
ImportExport
.
storage_path
}
-not -path
#{
Gitlab
::
ImportExport
.
storage
_path
}
-mmin +1440 -delete)
)
end
end
...
...
@@ -1111,6 +1111,6 @@ class Project < ActiveRecord::Base
end
def
export_path
File
.
join
(
ImportExport
.
storage_path
,
path_with_namespace
)
File
.
join
(
Gitlab
::
ImportExport
.
storage_path
,
path_with_namespace
)
end
end
app/workers/gitlab_
project_archive
_worker.rb
→
app/workers/gitlab_
remove_project_export
_worker.rb
View file @
bacd2c4f
class
Gitlab
ProjectArchive
Worker
class
Gitlab
RemoveProjectExport
Worker
include
Sidekiq
::
Worker
sidekiq_options
queue: :default
def
perform
Project
.
archi
ve_gitlab_exports!
Project
.
remo
ve_gitlab_exports!
end
end
config/initializers/1_settings.rb
View file @
bacd2c4f
...
...
@@ -288,9 +288,9 @@ Settings.cron_jobs['admin_email_worker']['job_class'] = 'AdminEmailWorker'
Settings
.
cron_jobs
[
'repository_archive_cache_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'repository_archive_cache_worker'
][
'cron'
]
||=
'0 * * * *'
Settings
.
cron_jobs
[
'repository_archive_cache_worker'
][
'job_class'
]
=
'RepositoryArchiveCacheWorker'
Settings
.
cron_jobs
[
'gitlab_
project_archive
_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'gitlab_
project_archive
_worker'
][
'cron'
]
||=
'0 * * * *'
Settings
.
cron_jobs
[
'gitlab_
project_archive_worker'
][
'job_class'
]
=
'GitlabProjectArchive
Worker'
Settings
.
cron_jobs
[
'gitlab_
remove_project_export
_worker'
]
||=
Settingslogic
.
new
({})
Settings
.
cron_jobs
[
'gitlab_
remove_project_export
_worker'
][
'cron'
]
||=
'0 * * * *'
Settings
.
cron_jobs
[
'gitlab_
remove_project_export_worker'
][
'job_class'
]
=
'GitlabRemoveProjectExport
Worker'
#
# GitLab Shell
...
...
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