Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix pylint3.2 errors #765

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/WebAppDIRAC/WebApp/handler/JobMonitorHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from DIRAC import gConfig, gLogger
from DIRAC.Core.Utilities import DictCache
from DIRAC.Core.Utilities.Graphs.Palette import Palette
from DIRAC.RequestManagementSystem.Client.Request import Request
from DIRAC.RequestManagementSystem.Client.ReqClient import ReqClient
from DIRAC.WorkloadManagementSystem.Client.JobMonitoringClient import JobMonitoringClient
from DIRAC.WorkloadManagementSystem.Client.JobManagerClient import JobManagerClient
Expand Down Expand Up @@ -284,6 +283,7 @@ def web_jobAction(self, JobID):
ids = [int(i) for i in ids]

RPC = JobManagerClient()
result = None
if self.get_argument("action") == "delete":
result = RPC.deleteJob(ids)
elif self.get_argument("action") == "kill":
Expand Down
3 changes: 2 additions & 1 deletion src/WebAppDIRAC/WebApp/handler/TokenManagerHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import datetime
import jwt

from DIRAC import gConfig, gLogger
from DIRAC import gLogger
from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getAllUsers
from DIRAC.FrameworkSystem.Client.TokenManagerClient import TokenManagerClient

Expand Down Expand Up @@ -93,6 +93,7 @@ def web_tokenData(self, userid: str, data_kind: str) -> dict:
:return: dict
"""
if (result := self.tm.getTokensByUserID(userid))["OK"]:
res = ""
if data_kind == "getAccessToken":
res = (
str(jwt.decode(result["Value"][0]["access_token"], options={"verify_signature": False}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def web_executeOperation(self, action, ids):

def __fileRetry(self, prodid, mode):
tsClient = TransformationClient()
result = None
if mode == "proc":
result = tsClient.getTransformationFilesCount(prodid, "ErrorCount", {"Status": "Processed"})
elif mode == "not":
Expand Down
6 changes: 3 additions & 3 deletions src/WebAppDIRAC/WebApp/handler/VMDiracHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def web_getRunningInstancesBEPHistory(self, bucketSize=900, timespan=86400):
eTime = TimeUtilities.toEpoch(record[0])
if eTime < olderThan:
rL = [eTime, record[1], int(record[2])]
data.append(rL)
data.append(rL)
return {"success": "true", "data": data}

def web_getRunningInstancesByRunningPodHistory(self, bucketSize=900, timespan=86400):
Expand All @@ -124,7 +124,7 @@ def web_getRunningInstancesByRunningPodHistory(self, bucketSize=900, timespan=86
eTime = TimeUtilities.toEpoch(record[0])
if eTime < olderThan:
rL = [eTime, record[1], int(record[2])]
data.append(rL)
data.append(rL)
return {"success": "true", "data": data}

def web_getRunningInstancesByImageHistory(self, bucketSize=900, timespan=86400):
Expand All @@ -137,5 +137,5 @@ def web_getRunningInstancesByImageHistory(self, bucketSize=900, timespan=86400):
eTime = TimeUtilities.toEpoch(record[0])
if eTime < olderThan:
rL = [eTime, record[1], int(record[2])]
data.append(rL)
data.append(rL)
return {"success": "true", "data": data}
Loading