Project

General

Profile

Actions

Defect/Bug #531

closed

Defect/Bug #256: Mark2

mark2 hold command with countdown

Added by Slind over 8 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2015-12-13
Due date:
% Done:

0%

Estimated time:
Resolution:
Out of date

Description

Using the mark2 hold command with a delay to count down e.g. ~hold 1m;10s, causes:

2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 > (mcgameserver) .hold 1m;10s 
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] An event handler threw an exception: 
      Callback: <bound method Shutdown.h_hold of <shutdown.Shutdown object at 0x7f5475024d10>>
      Event: 
        class_name: Hook
        line: .hold 1m;10s 
        args: 1m;10s 
        is_command: True
        name: hold

2015-12-13 14:37:04+0100 [UserServerProtocol,37,] *--- Failure #2991 (pickled) ---
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py:1070: _inlineCallbacks(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /home/mcgameserver/tools/mark2/mk2/manager.py:217: handle_user_input(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /home/mcgameserver/tools/mark2/mk2/events/__init__.py:238: dispatch(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /home/mcgameserver/tools/mark2/mk2/events/__init__.py:218: _next_event(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,]  [Capture of Locals and Globals disabled (use captureVars=True)]
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] --- <exception caught here> ---
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py:137: maybeDeferred(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /home/mcgameserver/tools/mark2/mk2/plugins/shutdown.py:116: h_hold(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /home/mcgameserver/tools/mark2/mk2/plugins/__init__.py:246: action_chain_cancellable(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] /home/mcgameserver/tools/mark2/mk2/plugins/__init__.py:282: parse_time(...)
2015-12-13 14:37:04+0100 [UserServerProtocol,37,]  [Capture of Locals and Globals disabled (use captureVars=True)]
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] exceptions.ValueError: invalid literal for int() with base 10: '10s'
2015-12-13 14:37:04+0100 [UserServerProtocol,37,] *--- End of Failure #2991 ---
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 # An event handler threw an exception: 
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #   Callback: <bound method Shutdown.h_hold of <shutdown.Shutdown object at 0x7f5475024d10>>
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #   Event: 
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     class_name: Hook
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     line: .hold 1m;10s 
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     args: 1m;10s 
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     is_command: True
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     name: hold
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #   Traceback (most recent call last):
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1070, in _inlineCallbacks
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       result = g.send(result)
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/home/mcgameserver/tools/mark2/mk2/manager.py", line 217, in handle_user_input
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       handled = yield self.events.dispatch(events.Hook(line=event.line))
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/home/mcgameserver/tools/mark2/mk2/events/__init__.py", line 238, in dispatch
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       d = self._next_event(event, event_list)
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/home/mcgameserver/tools/mark2/mk2/events/__init__.py", line 218, in _next_event
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       r = maybeDeferred(callback, event)
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #   --- <exception caught here> ---
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 137, in maybeDeferred
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       result = f(*args, **kw)
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/home/mcgameserver/tools/mark2/mk2/plugins/shutdown.py", line 116, in h_hold
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       warn_length, action, cancel = self.action_chain_cancellable(event.args, self.warn_stop, action, self.warn_cancel)
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/home/mcgameserver/tools/mark2/mk2/plugins/__init__.py", line 246, in action_chain_cancellable
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       intervals = [self.parse_time(i) for i in spec.split(';')]
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #     File "/home/mcgameserver/tools/mark2/mk2/plugins/__init__.py", line 282, in parse_time
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #       v = int(spec[:-1])
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #   exceptions.ValueError: invalid literal for int() with base 10: '10s'
2015-12-13 14:37:04+0100 [mark2] 2015-12-13 14:37:04 #   

Actions #1

Updated by Xfel11 over 8 years ago

But using the same time string with eg. .restart does work? That's strange as the error is thrown in the common time parser method...

Actions #2

Updated by Slind over 8 years ago

yes it does work with restart and stop

Actions #3

Updated by Slind about 8 years ago

apparently using 3 time duration steps seems to work e.g. 3m;1m;10s

Actions #4

Updated by SirWill over 3 years ago

  • Resolution set to Out of date
  • Status changed from Filed to Closed
Actions

Also available in: Atom PDF