diff --git a/server/src/uds/core/jobs/Scheduler.py b/server/src/uds/core/jobs/Scheduler.py index 34e94fc3..c968cdab 100644 --- a/server/src/uds/core/jobs/Scheduler.py +++ b/server/src/uds/core/jobs/Scheduler.py @@ -42,7 +42,7 @@ import threading import time import logging -__updated__ = '2014-02-19' +__updated__ = '2014-03-20' logger = logging.getLogger(__name__) @@ -107,7 +107,7 @@ class Scheduler(object): jobInstance = None try: now = getSqlDatetime() # Datetimes are based on database server times - fltr = Q(state=State.FOR_EXECUTE) & (Q(owner_server=self._hostname) | Q(owner_server='')) & (Q(last_execution__gt=now) | Q(next_execution__lt=now)) + fltr = Q(state=State.FOR_EXECUTE) & (Q(last_execution__gt=now) | Q(next_execution__lt=now)) with transaction.atomic(): # If next execution is before now or last execution is in the future (clock changed on this server, we take that task as executable) # This params are all set inside fltr (look at __init__) diff --git a/server/src/uds/core/workers/DeployedServiceCleaner.py b/server/src/uds/core/workers/DeployedServiceCleaner.py index 0260aa27..28b8a3a3 100644 --- a/server/src/uds/core/workers/DeployedServiceCleaner.py +++ b/server/src/uds/core/workers/DeployedServiceCleaner.py @@ -62,7 +62,6 @@ class DeployedServiceRemover(Job): def __init__(self, environment): super(DeployedServiceRemover, self).__init__(environment) - @transaction.atomic def startRemovalOf(self, ds): # Get publications in course...., can be at most 1!!! logger.debug('Removal process of {0}'.format(ds)) @@ -80,7 +79,6 @@ class DeployedServiceRemover(Job): ds.name = ds.name + ' (removed)' ds.save() - @transaction.atomic def continueRemovalOf(self, ds): # First, we remove all publications and user services in "info_state" ds.userServices.select_for_update().filter(state__in=State.INFO_STATES).delete() diff --git a/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py b/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py index 71680b83..52f39945 100644 --- a/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py +++ b/server/src/uds/osmanagers/WindowsOsManager/WindowsOsManager.py @@ -31,7 +31,7 @@ def scrambleMsg(data): for c in data[::-1]: res.append(chr(ord(c) ^ n)) n = (n + ord(c)) & 0xFF - return "".join(res).encode('hex') + return unicode(str.join(str(''), res).encode('hex')) class WindowsOsManager(osmanagers.OSManager): @@ -52,16 +52,15 @@ class WindowsOsManager(osmanagers.OSManager): defvalue='keep' ) - @staticmethod - def validateLen(len): + def validateLen(length): try: - len = int(len) + length = int(length) except Exception: raise osmanagers.OSManager.ValidationException(_('Length must be numeric!!')) - if len > 6 or len < 1: - raise osmanagers.OSManager.ValidationException(_('Length must be betwen 1 and six')) - return len + if length > 6 or length < 1: + raise osmanagers.OSManager.ValidationException(_('Length must be betwen 1 and 6')) + return length def __setProcessUnusedMachines(self): self.processUnusedMachines = self._onLogout == 'remove' diff --git a/server/src/uds/static/adm/js/api.coffee b/server/src/uds/static/adm/js/api.coffee index 93389a01..558855ae 100644 --- a/server/src/uds/static/adm/js/api.coffee +++ b/server/src/uds/static/adm/js/api.coffee @@ -334,7 +334,7 @@ class DetailModelRestApi extends BasicModelRest # Generic "Invoke" method (with no args, if needed, put them on "method" after "?" as normal url would be invoke: (method, success_fnc, fail_fnc) -> - @base.get + @get id: method success: success_fnc fail: fail_fnc diff --git a/server/src/uds/templates/uds/admin/tmpl/configuration.html b/server/src/uds/templates/uds/admin/tmpl/configuration.html index 1ef4fa44..660ef84e 100644 --- a/server/src/uds/templates/uds/admin/tmpl/configuration.html +++ b/server/src/uds/templates/uds/admin/tmpl/configuration.html @@ -18,13 +18,13 @@ {{/ eachKey }}