Skip to content

Commit

Permalink
TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisburr committed Nov 28, 2023
1 parent 07ec6c9 commit 2c41cfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/DIRAC/FrameworkSystem/Service/ProxyManagerHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ def export_exchangeProxyForToken(self):
credDict["username"],
credDict["group"],
set(credDict.get("groupProperties", []) + credDict.get("properties", [])),
# expires_minutes=credDict.get("tokenLifetime", None),
)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from collections import defaultdict
from datetime import datetime
from diracx.client import DiracClient
from diracx.core.preferences import DiracxPreferences

from DIRAC import gConfig
from DIRAC.Core.Security.DiracX import DiracXClient
from DIRAC.Core.Utilities.ReturnValues import convertToReturnValue

DATETIME_PARAMETERS = [
Expand All @@ -21,22 +19,14 @@

class JobMonitoringClient:
def _fetch_summary(self, grouping, search=None):
diracxUrl = gConfig.getValue("/DiracX/URL")
if not diracxUrl:
raise ValueError("Missing mandatory /DiracX/URL configuration")
pref = DiracxPreferences(url=diracxUrl)
with DiracClient(diracx_preferences=pref) as api:
with DiracXClient() as api:
return api.jobs.summary(grouping=grouping, search=search)

def _fetch_search(self, parameters, jobIDs):
if not isinstance(jobIDs, list):
jobIDs = [jobIDs]

diracxUrl = gConfig.getValue("/DiracX/URL")
if not diracxUrl:
raise ValueError("Missing mandatory /DiracX/URL configuration")
pref = DiracxPreferences(url=diracxUrl)
with DiracClient(diracx_preferences=pref) as api:
with DiracXClient() as api:
jobs = api.jobs.search(
parameters=(["JobID"] + parameters) if parameters else None,
search=[{"parameter": "JobID", "operator": "in", "values": jobIDs}],
Expand Down
2 changes: 2 additions & 0 deletions tests/Jenkins/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ installDIRAC() {
fi
fi

pip install git+https://github.com/DIRACGrid/diracx.git

if [[ -n "${INSTALLATION_BRANCH}" ]]; then
# Use this for (e.g.) running backward-compatibility tests
echo "pip-installing DIRAC from git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]"
Expand Down

0 comments on commit 2c41cfb

Please sign in to comment.