Skip to content

Commit a04b3f2

Browse files
committed
sweep: #6844 ReqProxy does not immediately forward to central service
1 parent c99ee4a commit a04b3f2

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

src/DIRAC/RequestManagementSystem/Service/ReqProxyHandler.py

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ def export_getStatus(self):
167167
types_putRequest = [str]
168168

169169
def export_putRequest(self, requestJSON):
170-
"""forward request from local RequestDB to central RequestManager
170+
"""Dump the request in a local cache for later forwarding
171171
172172
:param self: self reference
173-
:param str requestType: request type
173+
:param str requestJSON: json dump of the request
174174
"""
175175

176176
requestDict = json.loads(requestJSON)
@@ -189,21 +189,13 @@ def export_putRequest(self, requestJSON):
189189
if not forwardable["OK"]:
190190
gLogger.warn("putRequest: ", f"{forwardable['Message']}")
191191

192-
setRequest = self.requestManager().putRequest(requestJSON)
193-
if not setRequest["OK"]:
194-
gLogger.error(
195-
"setRequest: unable to set request", f"'{requestName}' @ RequestManager: {setRequest['Message']}"
196-
)
197-
# # put request to the request file cache
198-
save = self.__saveRequest(requestName, requestJSON)
199-
if not save["OK"]:
200-
gLogger.error("setRequest: unable to save request to the cache", save["Message"])
201-
return save
202-
gLogger.info("setRequest: ", f"{requestName} is saved to {save['Value']} file")
203-
return S_OK({"set": False, "saved": True})
204-
205-
gLogger.info("setRequest: ", f"request '{requestName}' has been set to the ReqManager")
206-
return S_OK({"set": True, "saved": False})
192+
# # put request to the request file cache
193+
save = self.__saveRequest(requestName, requestJSON)
194+
if not save["OK"]:
195+
gLogger.error("setRequest: unable to save request to the cache", save["Message"])
196+
return save
197+
gLogger.info("setRequest: ", f"{requestName} is saved to {save['Value']} file")
198+
return S_OK({"set": False, "saved": True})
207199

208200
@staticmethod
209201
def __forwardable(requestDict):

0 commit comments

Comments
 (0)