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
ba96f077
Commit
ba96f077
authored
Jul 06, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor Geo::BaseSyncService#update_registry
parent
010d58e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
app/services/geo/base_sync_service.rb
app/services/geo/base_sync_service.rb
+10
-8
No files found.
app/services/geo/base_sync_service.rb
View file @
ba96f077
...
...
@@ -50,16 +50,18 @@ module Geo
log
(
"Updating
#{
type
}
sync information"
)
if
started_at
registry
.
public_send
(
"last_
#{
type
}
_synced_at="
,
started_at
)
attrs
=
{}.
tap
do
|
attrs
|
if
started_at
attrs
[
"last_
#{
type
}
_synced_at"
]
=
started_at
end
if
finished_at
attrs
[
"last_
#{
type
}
_successful_sync_at"
]
=
finished_at
attrs
[
"resync_
#{
type
}
"
]
=
false
end
end
if
finished_at
registry
.
public_send
(
"last_
#{
type
}
_successful_sync_at="
,
finished_at
)
registry
.
public_send
(
"resync_
#{
type
}
="
,
false
)
end
registry
.
save!
registry
.
update!
(
attrs
)
end
def
lease_key
...
...
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