adapted to 3.0.4

This commit is contained in:
dcore94 2021-05-12 15:47:15 +02:00
parent 3b0e186281
commit 99fb92d749
4 changed files with 14 additions and 13 deletions

View File

@ -215,12 +215,13 @@ class TaskClient(BaseClient):
return None
def ackTask(self, taskId, workerid):
url = self.makeUrl('{}/ack', taskId)
params = {}
params['workerid'] = workerid
headers = {'Accept': 'application/json'}
value = self.post(url, params, None, headers)
return value in ['true', True]
#url = self.makeUrl('{}/ack', taskId)
#params = {}
#params['workerid'] = workerid
#headers = {'Accept': 'application/json'}
#value = self.post(url, params, None, headers)
#return value in ['true', True]
return True
def getTasksInQueue(self, taskName):
url = self.makeUrl('queue/{}', taskName)

View File

@ -1,10 +1,10 @@
#!/bin/bash
export BASE=${CONDUCTOR_SERVER:-http://conductorserver:8080/api}
export HEALTH=${CONDUCTOR_HEALTH:-http://conductor-server:8080/health}
echo 'Waiting for Conductor at ' $BASE '...'
echo 'Waiting for Conductor at ' $HEALTH '...'
while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' $BASE/health)" != 200 ]]; do
while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' $HEALTH)" != 200 ]]; do
echo 'still waiting ...'
sleep 5
done

View File

@ -1,10 +1,10 @@
#!/bin/bash
export BASE=${CONDUCTOR_SERVER:-http://conductorserver:8080/api}
export HEALTH=${CONDUCTOR_HEALTH:-http://conductor-server:8080/health}
echo 'Waiting for Conductor at ' $BASE ' ...'
echo 'Waiting for Conductor at ' $HEALTH ' ...'
while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' $BASE/health)" != 200 ]]; do
while [[ "$(curl -s -o /dev/null -L -w ''%{http_code}'' $HEALTH)" != 200 ]]; do
echo 'still waiting ...'
sleep 5
done

View File

@ -1,6 +1,6 @@
#!/bin/bash
export BASE="http://conductorserver:8080/api"
export BASE="http://conductorserver:8080"
echo 'Waiting for Conductor ...'