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
a4df30c3
Commit
a4df30c3
authored
May 07, 2018
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch to timestamp with time zone
parent
f7d26635
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
ee/app/workers/ee/repository_check/single_repository_worker.rb
...p/workers/ee/repository_check/single_repository_worker.rb
+1
-1
ee/db/geo/migrate/20180427114641_add_repository_check_to_geo_project_registry.rb
...427114641_add_repository_check_to_geo_project_registry.rb
+1
-1
ee/spec/workers/ee/repository_check/single_repository_worker_spec.rb
...kers/ee/repository_check/single_repository_worker_spec.rb
+8
-0
No files found.
ee/app/workers/ee/repository_check/single_repository_worker.rb
View file @
a4df30c3
...
@@ -14,7 +14,7 @@ module EE
...
@@ -14,7 +14,7 @@ module EE
project_registry
.
assign_attributes
(
project_registry
.
assign_attributes
(
last_repository_check_failed:
!
healthy
,
last_repository_check_failed:
!
healthy
,
last_repository_check_at:
Time
.
now
last_repository_check_at:
Time
.
zone
.
now
)
)
project_registry
.
save!
project_registry
.
save!
end
end
...
...
ee/db/geo/migrate/20180427114641_add_repository_check_to_geo_project_registry.rb
View file @
a4df30c3
...
@@ -8,6 +8,6 @@ class AddRepositoryCheckToGeoProjectRegistry < ActiveRecord::Migration
...
@@ -8,6 +8,6 @@ class AddRepositoryCheckToGeoProjectRegistry < ActiveRecord::Migration
def
change
def
change
add_column
:project_registry
,
:last_repository_check_failed
,
:boolean
add_column
:project_registry
,
:last_repository_check_failed
,
:boolean
add_column
:project_registry
,
:last_repository_check_at
,
:datetime
add_column
:project_registry
,
:last_repository_check_at
,
:datetime
_with_timezone
end
end
end
end
ee/spec/workers/ee/repository_check/single_repository_worker_spec.rb
View file @
a4df30c3
...
@@ -38,5 +38,13 @@ describe EE::RepositoryCheck::SingleRepositoryWorker do
...
@@ -38,5 +38,13 @@ describe EE::RepositoryCheck::SingleRepositoryWorker do
expect
(
project_registry
.
last_repository_check_failed
).
to
be_falsy
expect
(
project_registry
.
last_repository_check_failed
).
to
be_falsy
end
end
it
'creates Geo registry when not yet exists'
do
project_registry
.
destroy!
worker
.
perform
(
project
.
id
)
expect
(
Geo
::
ProjectRegistry
.
find_by!
(
project:
project
.
id
).
last_repository_check_failed
).
to
be_falsy
end
end
end
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