Skip to content

Commit

Permalink
use the service id to identify services
Browse files Browse the repository at this point in the history
  • Loading branch information
smn committed Jul 13, 2015
1 parent b9282c1 commit ca63f2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consular/main.py
Expand Up @@ -135,7 +135,7 @@ def update_task_running(self, request, event):

def update_task_killed(self, request, event):
d = self.consul_request('PUT', '/v1/agent/service/deregister/%s' % (
get_appid(event),))
event['taskId'],))
d.addCallback(lambda _: json.dumps({'status': 'ok'}))
return d

Expand Down
2 changes: 1 addition & 1 deletion consular/tests/test_main.py
Expand Up @@ -141,7 +141,7 @@ def test_TASK_RUNNING(self):
self.assertEqual(request['path'], '/v1/agent/service/register')
self.assertEqual(request['data'], {
'Name': 'my-app',
'taskId': 'my-app_0-1396592784349',
'ID': 'my-app_0-1396592784349',
'Address': 'slave-1234.acme.org',
'Port': 31372,
})
Expand Down

0 comments on commit ca63f2a

Please sign in to comment.