[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Web API--sendFiel() but empty file



Hello everyone:
I am using the condor's web service API to submit a job. But there are some questions.
The folling is the python code, accessing the Web Service to send a file. All returned status-code are SUCCESS, but
the bta4 file is empty in the service machine. And the SOAP message contain the whole base64 content of "
bta42 " in client,
why is the file empty in the service ?

bta41 = open("bta4", mode="rb")
bta42 = base64.b64encode(bta41.read())
len_b = os.path.getsize("bta4")
sta1 = schedd.service.declareFile(tran_status.transaction, clu_id.integer, job_id.integer, "bta4",
 len_b, hash_enum.NOHASH, None)
sta2 = schedd.service.sendFile(tran_status.transaction, clu_id.integer, job_id.integer, "bta4", 0, bta42)

This is my scecond to ask the question. Anyone can help me? I will appreciate you.