Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
86edac25
Commit
86edac25
authored
3 years ago
by
Seth Hoenig
Browse files
Options
Download
Email Patches
Plain Diff
wip ignore empty ops
parent
e66cd332
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
command/agent/consul/service_client.go
+13
-0
command/agent/consul/service_client.go
with
13 additions
and
0 deletions
+13
-0
command/agent/consul/service_client.go
+
13
-
0
View file @
86edac25
...
...
@@ -363,6 +363,10 @@ func (o operations) empty() bool {
}
}
func
(
o
operations
)
String
()
string
{
return
fmt
.
Sprintf
(
"<%d, %d, %d, %d>"
,
len
(
o
.
regServices
),
len
(
o
.
regChecks
),
len
(
o
.
deregServices
),
len
(
o
.
deregChecks
))
}
// AllocRegistration holds the status of services registered for a particular
// allocations by task.
type
AllocRegistration
struct
{
...
...
@@ -709,6 +713,15 @@ INIT:
// commit operations unless already shutting down.
func
(
c
*
ServiceClient
)
commit
(
from
string
,
ops
*
operations
)
{
fmt
.
Println
(
"commit ops, from:"
,
from
)
// todo: we should not even commit empty opts, why are we
if
ops
.
empty
()
{
fmt
.
Println
(
" ... ops is empty, ignoring"
)
return
}
fmt
.
Println
(
" ... ops not empty, accepting:"
,
ops
)
select
{
case
c
.
opCh
<-
ops
:
case
<-
c
.
shutdownCh
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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