Skip to content

Commit

Permalink
Merge remote-tracking branch 'release/rel-v7r2' into rel-v7r2
Browse files Browse the repository at this point in the history
  • Loading branch information
atsareg committed Mar 30, 2021
2 parents f9ab447 + 395b3fa commit 3849853
Show file tree
Hide file tree
Showing 12 changed files with 206 additions and 183 deletions.
2 changes: 1 addition & 1 deletion src/DIRAC/AccountingSystem/Client/DataStoreClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def delayedCommit(self):
allowing to send more registers at once (reduces overheads).
"""

if not self.__commitTimer.isAlive():
if not self.__commitTimer.is_alive():
self.__commitTimer = threading.Timer(5, self.commit)
self.__commitTimer.start()

Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/Core/DISET/private/MessageBroker.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def listenToTransport(self, trid, listen=True):
# Listen to connections

def __startListeningThread(self):
threadDead = self.__listeningForMessages and self.__listenThread is not None and not self.__listenThread.isAlive()
threadDead = self.__listeningForMessages and self.__listenThread is not None and not self.__listenThread.is_alive()
if not self.__listeningForMessages or threadDead:
self.__listeningForMessages = True
self.__listenThread = threading.Thread(target=self.__listenAutoReceiveConnections)
Expand Down
13 changes: 8 additions & 5 deletions src/DIRAC/Core/Utilities/DErrno.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
# 1200: Framework
# 1300: Interfaces
# 1400: Config
# 1500: WMS / Workflow
# 1600: DMS/StorageManagement
# 1500: WMS + Workflow
# 1600: DMS + StorageManagement
# 1700: RMS
# 1800: Accounting
# 1900: TS
# 2000: Resources and RSS
# 1800: Accounting + Monitoring
# 1900: TS + Production
# 2000: Resources + RSS

# ## Generic (10XX)
# Python related: 0X
Expand Down Expand Up @@ -116,6 +116,7 @@
EWMSJDL = 1501
EWMSRESC = 1502
EWMSSUBM = 1503
EWMSNOPILOT = 1550

# ## DMS/StorageManagement (16XX)
EFILESIZE = 1601
Expand Down Expand Up @@ -190,6 +191,7 @@
1501: 'EWMSJDL',
1502: 'EWMSRESC',
1503: 'EWMSSUBM',
1550: 'EWMSNOPILOT',
# DMS/StorageManagement
1601: 'EFILESIZE',
1602: 'EGFAL',
Expand Down Expand Up @@ -262,6 +264,7 @@
EWMSJDL: "Invalid job description",
EWMSRESC: "Job to reschedule",
EWMSSUBM: "Job submission error",
EWMSNOPILOT: "No pilots found",
# DMS/StorageManagement
EFILESIZE: "Bad file size",
EGFAL: "Error with the gfal call",
Expand Down
15 changes: 10 additions & 5 deletions src/DIRAC/Core/Utilities/MySQL.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def clean(self, now=False):
now = time.time()
self.__lastClean = now
for thid in list(self.__assigned):
if not thid.isAlive():
if not thid.is_alive():
self.__pop(thid)
try:
data = self.__assigned[thid]
Expand Down Expand Up @@ -1117,10 +1117,15 @@ def buildCondition(self, condDict=None, older=None, newer=None,
attrName,
escapeInValue)
else:
condition = ' %s %s %s = %s' % (condition,
conjunction,
attrName,
escapeInValue)
if escapeInValue == 'NULL':
condition = ' %s %s %s IS NULL' % (condition,
conjunction,
attrName)
else:
condition = ' %s %s %s = %s' % (condition,
conjunction,
attrName,
escapeInValue)
conjunction = "AND"

if timeStamp:
Expand Down
4 changes: 0 additions & 4 deletions src/DIRAC/FrameworkSystem/private/standardLogging/Logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@

from DIRAC import S_ERROR
from DIRAC.FrameworkSystem.private.standardLogging.LogLevels import LogLevels
from DIRAC.Core.Utilities.Decorators import deprecated
from DIRAC.Core.Utilities.LockRing import LockRing
from DIRAC.Resources.LogBackends.AbstractBackend import AbstractBackend


class Logging(object):
"""
- Logging is a wrapper of the logger object from the standard "logging" library which integrates some DIRAC concepts.
- It aimed at seamlessly replacing the previous gLogger implementation and thus provides the same interface.
- Logging is generally used to create log records, that are then sent to pre-determined backends.
Expand Down Expand Up @@ -453,4 +450,3 @@ def getSubLogger(self, subName, child=True):
return childLogging
finally:
self._lockInit.release()

2 changes: 1 addition & 1 deletion src/DIRAC/ResourceStatusSystem/Utilities/RSSCache.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def isCacheAlive(self):
'''
Returns status of the cache refreshing thread
'''
return S_OK(self.__refreshThread.isAlive())
return S_OK(self.__refreshThread.is_alive())

def setLifeTime(self, lifeTime):
'''
Expand Down
Loading

0 comments on commit 3849853

Please sign in to comment.