Skip to content

Commit

Permalink
Fixing PanDA client
Browse files Browse the repository at this point in the history
Adding logging
  • Loading branch information
Foorth committed May 24, 2023
1 parent 0dfa084 commit 9bbd5d8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/panda_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ def kill_task(auth, jeditaskid):
resp = resp.text
except Exception as ex:
resp = "ERROR killTask: %s" % (ex)
_logger.error(ex)
else:
resp = 'Jeditaskid is not defined'

_logger.debug("Finish task command. jeditaskid: {0}, properErrorCode: {1}, URL: {2}, response: {3}".
format(data['jediTaskID'], data['properErrorCode'], url, resp))
return resp


Expand Down Expand Up @@ -94,10 +96,12 @@ def finish_task(auth, jeditaskid, soft=True):
resp = post(url, headers=auth, data=data)
resp = resp.text
except Exception as ex:
resp = "ERROR finishTask: %s %s" % (ex, resp.status_code)
resp = "ERROR finishTask: %s" % (ex)
_logger.error(ex)
else:
resp = 'Jeditaskid is not defined'

_logger.debug("Finish task command. jeditaskid: {0}, properErrorCode: {1}, soft: {2}, URL: {3}, response: {4}".
format(data['jediTaskID'], data['properErrorCode'], data['soft'], url, resp))
return resp


Expand Down

0 comments on commit 9bbd5d8

Please sign in to comment.