Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/Agent/PilotSyncAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,14 @@ def execute(self):
self.log.info("Attempting to upload", f"to {server}")
if server.startswith("https://"):
for tf in allFiles:
res = requests.put(server, data=tf, verify=self.casLocation, cert=self.certAndKeyLocation)
if res.status_code not in (200, 202):
res = requests.put(
f"{server}/{os.path.basename(tf)}",
data=open(tf, "rb"),
verify=self.casLocation,
cert=self.certAndKeyLocation,
timeout=30,
)
if res.status_code not in (200, 201, 202, 204):
self.log.error("Could not upload", f"to {server}: status {res.status_code}")
else: # Assumes this is a DIRAC SE
for tf in allFiles:
Expand Down
Loading