forked from shaba/openuds
* Fixed scheduler query for select what tasks are available
* Added more space to configuration labels * Fixed WindowsOSManger unicode related problem * pep8 to Actor.py (xmlrpc)
This commit is contained in:
parent
9302c0cd76
commit
c62d30c506
@ -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__)
|
||||
|
@ -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()
|
||||
|
@ -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'
|
||||
|
@ -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
|
||||
|
@ -18,13 +18,13 @@
|
||||
{{/ eachKey }}
|
||||
</ul>
|
||||
<div class="row">
|
||||
<div class="tab-content col-md-12 col-md-offset-0 col-lg-6 col-lg-offset-1">
|
||||
<div class="tab-content col-md-12 col-md-offset-0 col-lg-8 col-lg-offset-2">
|
||||
{{# eachKey config }}
|
||||
<div class="tab-pane {{# if first }}active{{/ if }}" id="section_{{ key }}">
|
||||
{{# eachKey value }}
|
||||
<div class="form-group">
|
||||
<label for="fld_{{ clean_whitespace ../key }}{{ key }}" class="col-sm-3 control-label">{{ key }}</label>
|
||||
<div class="col-sm-9">
|
||||
<label for="fld_{{ clean_whitespace ../key }}{{ key }}" class="col-sm-5 control-label">{{ key }}</label>
|
||||
<div class="col-sm-6">
|
||||
{{# if value.crypt }}
|
||||
<div class="input-group">
|
||||
<input type="password" class="form-control" data-section="{{ ../../key }}" data-key="{{ ../key }}" id="fld_{{ clean_whitespace ../../key }}{{ clean_whitespace ../key }}" value="€fa{}#42123~#||23|ßðđæ">
|
||||
|
@ -39,6 +39,7 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def test():
|
||||
'''
|
||||
Simple test function called by actors to test communication.
|
||||
|
Loading…
Reference in New Issue
Block a user