[8.0] Replace BLOBs with TEXTs for JobDB and PilotAgentsDB#5840
Merged
Conversation
06167c3 to
5da388f
Compare
5da388f to
1f8f854
Compare
96aec08 to
7b20c48
Compare
chrisburr
reviewed
Feb 16, 2022
| `JobID` INT(11) UNSIGNED NOT NULL, | ||
| `Name` VARCHAR(100) NOT NULL, | ||
| `Value` BLOB NOT NULL, | ||
| `Value` TEXT NOT NULL, |
Member
There was a problem hiding this comment.
I think you've picked up a tab here:
Suggested change
| `Value` TEXT NOT NULL, | |
| `Value` TEXT NOT NULL, |
| for site, status, lastUpdateTime, author, comment in result["Value"]: | ||
| siteDict[site] = status, lastUpdateTime, author, comment.decode() | ||
| try: | ||
| comment = comment.decode() |
Member
There was a problem hiding this comment.
Suggested change
| comment = comment.decode() | |
| # TODO: This is only needed in DIRAC v8.0.x while moving from BLOB -> TEXT | |
| comment = comment.decode() |
I would also be tempted to do an if isinstance(comment, bytes): here but it's up to you.
| site, status, lastUpdate, author, comment = resSite["Value"][0] | ||
| resultDict[site] = [[status, str(lastUpdate), author, comment.decode()]] | ||
| try: | ||
| comment = comment.decode() |
| resultDict[site] = [] | ||
| resultDict[site].append([status, str(utime), author, comment.decode()]) | ||
| try: | ||
| comment = comment.decode() |
| result = self._update(req) | ||
| if not result["OK"]: | ||
| return S_ERROR("Failed to set the heart beat time: " + result["Message"]) | ||
| return S_ERROR(f"Failed to set the heart beat time: " + result["Message"]) |
Member
There was a problem hiding this comment.
As you made this an f-string I presume you meant:
Suggested change
| return S_ERROR(f"Failed to set the heart beat time: " + result["Message"]) | |
| return S_ERROR(f"Failed to set the heart beat time: {result['Message']}") |
| delTime = ret["Value"] | ||
|
|
||
| self.log.verbose("Removing HeartBeatLogginInfo for", "%r %r %r" % (status, delTime, maxLines)) | ||
| self.log.verbose("Removing HeartBeatLogginInfo for", f"{status} {delTime} {maxLines}") |
Member
There was a problem hiding this comment.
Do you want to keep the use if repr here?
Suggested change
| self.log.verbose("Removing HeartBeatLogginInfo for", f"{status} {delTime} {maxLines}") | |
| self.log.verbose("Removing HeartBeatLogginInfo for", f"{status!r} {delTime!r} {maxLines!r}") |
chrisburr
approved these changes
Feb 17, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #5253
BEGINRELEASENOTES
*WMS
CHANGE: Replace BLOBs with TEXTs for JobDB and PilotAgentsDB
ENDRELEASENOTES