Skip to content

Commit

Permalink
Merge pull request #296 from ryuwd/roneil-jobmgr
Browse files Browse the repository at this point in the history
Refactor Job manager routes
  • Loading branch information
aldbr authored Dec 18, 2024
2 parents 5704f63 + 57e610c commit 3dd59d5
Show file tree
Hide file tree
Showing 46 changed files with 3,194 additions and 4,764 deletions.
1 change: 1 addition & 0 deletions diracx-cli/tests/legacy/cs_sync/integration_test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ Systems
{
#@@-prod - /C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser - 2023-10-02 12:36:08
RescheduleDelays = 0
MaxRescheduling = 3
}
}
}
Expand Down
1 change: 1 addition & 0 deletions diracx-cli/tests/legacy/cs_sync/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ Systems:
Optimizers:
JobScheduling:
RescheduleDelays: '0'
MaxRescheduling: '3'
FailoverURLs: {}
Services:
Matcher:
Expand Down
8 changes: 6 additions & 2 deletions diracx-cli/tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import os
import tempfile
from io import StringIO

import pytest
from pytest import raises
Expand Down Expand Up @@ -51,8 +52,11 @@ async def test_submit(with_cli_login, jdl_file, capfd):
async def test_search(with_cli_login, jdl_file, capfd):
"""Test searching for jobs."""
# Submit 20 jobs
with open(jdl_file, "r") as temp_file:
await cli.jobs.submit([temp_file] * 20)
with open(jdl_file, "r") as x:
what_we_submit = x.read()
jdls = [StringIO(what_we_submit) for _ in range(20)]

await cli.jobs.submit(jdls)

cap = capfd.readouterr()

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position
Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions diracx-client/src/diracx/client/generated/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
return ET.Element(tag)


class Model(object):
class Model:
"""Mixin for all client request body/response body models to support
serialization and deserialization.
"""
Expand Down Expand Up @@ -601,7 +601,7 @@ def _decode_attribute_map_key(key):
return key.replace("\\.", ".")


class Serializer(object): # pylint: disable=too-many-public-methods
class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
Expand Down Expand Up @@ -1536,7 +1536,7 @@ def xml_key_extractor(
return children[0]


class Deserializer(object):
class Deserializer:
"""Response object model deserializer.
:param dict classes: Class type dictionary for deserializing complex types.
Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/_vendor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/aio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position
Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/aio/_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion diracx-client/src/diracx/client/generated/aio/_vendor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.26.5)
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.3, generator: @autorest/python@6.27.1)
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position
Expand Down
Loading

0 comments on commit 3dd59d5

Please sign in to comment.