-
Notifications
You must be signed in to change notification settings - Fork 176
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
[v8.0] feat (TS): add getTransformationFilesAsJsonString #7840
Changes from all commits
57d2a43
2f5c0c2
3b46ca9
ee979eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
""" Service for interacting with TransformationDB | ||
""" | ||
|
||
from DIRAC import S_OK, S_ERROR | ||
from DIRAC.Core.DISET.RequestHandler import RequestHandler | ||
from DIRAC.Core.Security.Properties import SecurityProperty | ||
from DIRAC.Core.Utilities.DEncode import ignoreEncodeWarning | ||
from DIRAC.Core.Utilities.JEncode import encode as jencode | ||
from DIRAC.Core.Utilities.ObjectLoader import ObjectLoader | ||
from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations | ||
from DIRAC.TransformationSystem.Client import TransformationFilesStatus | ||
|
@@ -289,6 +291,7 @@ def export_getTransformationFiles( | |
limit=None, | ||
offset=None, | ||
columns=None, | ||
include_web_records=True, | ||
): | ||
if not condDict: | ||
condDict = {} | ||
|
@@ -302,8 +305,22 @@ def export_getTransformationFiles( | |
offset=offset, | ||
connection=False, | ||
columns=columns, | ||
include_web_records=include_web_records, | ||
) | ||
|
||
types_getTransformationFilesAsJsonString = types_getTransformationFiles | ||
|
||
def export_getTransformationFilesAsJsonString(self, *args, **kwargs): | ||
""" | ||
DEncode cannot cope with nested structures of multiple millions items. | ||
Encode everything as a json string, that DEncode can then transmit faster. | ||
|
||
This will be the default as of v9.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then you should add a deprecation notice for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We were thinking we would keep |
||
""" | ||
kwargs["include_web_records"] = False | ||
res = self.export_getTransformationFiles(*args, **kwargs) | ||
return S_OK(jencode(res)) | ||
|
||
#################################################################### | ||
# | ||
# These are the methods to manipulate the TransformationTasks table | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reverse this flag, and make a tiny WebApp patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We suspect it isn't used at all. The idea would be to switch it back in v9 but it's a nasty backwards incompatible change in a patch release if anyone does happen to be using it.