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 return None
def ackTask(self, taskId, workerid): def ackTask(self, taskId, workerid):
url = self.makeUrl('{}/ack', taskId) #url = self.makeUrl('{}/ack', taskId)
params = {} #params = {}
params['workerid'] = workerid #params['workerid'] = workerid
headers = {'Accept': 'application/json'} #headers = {'Accept': 'application/json'}
value = self.post(url, params, None, headers) #value = self.post(url, params, None, headers)
return value in ['true', True] #return value in ['true', True]
return True
def getTasksInQueue(self, taskName): def getTasksInQueue(self, taskName):
url = self.makeUrl('queue/{}', taskName) url = self.makeUrl('queue/{}', taskName)

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/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 ...' echo 'still waiting ...'
sleep 5 sleep 5
done done

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/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 ...' echo 'still waiting ...'
sleep 5 sleep 5
done done

View File

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