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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8095f7f5
Commit
8095f7f5
authored
Aug 25, 2020
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove reset_ci_minutes_for_all_namespaces FF
parent
1949b6bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
8 deletions
+0
-8
app/models/project_statistics.rb
app/models/project_statistics.rb
+0
-1
ee/app/models/namespace_statistics.rb
ee/app/models/namespace_statistics.rb
+0
-1
ee/app/services/ci/minutes/batch_reset_service.rb
ee/app/services/ci/minutes/batch_reset_service.rb
+0
-2
lib/gitlab/ci/features.rb
lib/gitlab/ci/features.rb
+0
-4
No files found.
app/models/project_statistics.rb
View file @
8095f7f5
...
@@ -23,7 +23,6 @@ class ProjectStatistics < ApplicationRecord
...
@@ -23,7 +23,6 @@ class ProjectStatistics < ApplicationRecord
scope
:for_project_ids
,
->
(
project_ids
)
{
where
(
project_id:
project_ids
)
}
scope
:for_project_ids
,
->
(
project_ids
)
{
where
(
project_id:
project_ids
)
}
scope
:for_namespaces
,
->
(
namespaces
)
{
where
(
namespace:
namespaces
)
}
scope
:for_namespaces
,
->
(
namespaces
)
{
where
(
namespace:
namespaces
)
}
scope
:with_any_ci_minutes_used
,
->
{
where
.
not
(
shared_runners_seconds:
0
)
}
def
total_repository_size
def
total_repository_size
repository_size
+
lfs_objects_size
repository_size
+
lfs_objects_size
...
...
ee/app/models/namespace_statistics.rb
View file @
8095f7f5
...
@@ -6,7 +6,6 @@ class NamespaceStatistics < ApplicationRecord
...
@@ -6,7 +6,6 @@ class NamespaceStatistics < ApplicationRecord
validates
:namespace
,
presence:
true
validates
:namespace
,
presence:
true
scope
:for_namespaces
,
->
(
namespaces
)
{
where
(
namespace:
namespaces
)
}
scope
:for_namespaces
,
->
(
namespaces
)
{
where
(
namespace:
namespaces
)
}
scope
:with_any_ci_minutes_used
,
->
{
where
.
not
(
shared_runners_seconds:
0
)
}
def
shared_runners_minutes
(
include_extra:
true
)
def
shared_runners_minutes
(
include_extra:
true
)
minutes
=
shared_runners_seconds
.
to_i
/
60
minutes
=
shared_runners_seconds
.
to_i
/
60
...
...
ee/app/services/ci/minutes/batch_reset_service.rb
View file @
8095f7f5
...
@@ -81,11 +81,9 @@ module Ci
...
@@ -81,11 +81,9 @@ module Ci
def
reset_shared_runners_seconds!
(
namespaces
)
def
reset_shared_runners_seconds!
(
namespaces
)
namespace_relation
=
NamespaceStatistics
.
for_namespaces
(
namespaces
)
namespace_relation
=
NamespaceStatistics
.
for_namespaces
(
namespaces
)
namespace_relation
=
namespace_relation
.
with_any_ci_minutes_used
unless
::
Gitlab
::
Ci
::
Features
.
reset_ci_minutes_for_all_namespaces?
namespace_relation
.
update_all
(
shared_runners_seconds:
0
,
shared_runners_seconds_last_reset:
Time
.
current
)
namespace_relation
.
update_all
(
shared_runners_seconds:
0
,
shared_runners_seconds_last_reset:
Time
.
current
)
project_relation
=
::
ProjectStatistics
.
for_namespaces
(
namespaces
)
project_relation
=
::
ProjectStatistics
.
for_namespaces
(
namespaces
)
project_relation
=
project_relation
.
with_any_ci_minutes_used
unless
::
Gitlab
::
Ci
::
Features
.
reset_ci_minutes_for_all_namespaces?
project_relation
.
update_all
(
shared_runners_seconds:
0
,
shared_runners_seconds_last_reset:
Time
.
current
)
project_relation
.
update_all
(
shared_runners_seconds:
0
,
shared_runners_seconds_last_reset:
Time
.
current
)
end
end
...
...
lib/gitlab/ci/features.rb
View file @
8095f7f5
...
@@ -68,10 +68,6 @@ module Gitlab
...
@@ -68,10 +68,6 @@ module Gitlab
::
Feature
.
enabled?
(
:ci_lint_creates_pipeline_with_dry_run
,
project
,
default_enabled:
true
)
::
Feature
.
enabled?
(
:ci_lint_creates_pipeline_with_dry_run
,
project
,
default_enabled:
true
)
end
end
def
self
.
reset_ci_minutes_for_all_namespaces?
::
Feature
.
enabled?
(
:reset_ci_minutes_for_all_namespaces
,
default_enabled:
false
)
end
def
self
.
project_transactionless_destroy?
(
project
)
def
self
.
project_transactionless_destroy?
(
project
)
Feature
.
enabled?
(
:project_transactionless_destroy
,
project
,
default_enabled:
false
)
Feature
.
enabled?
(
:project_transactionless_destroy
,
project
,
default_enabled:
false
)
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