Skip to content

Commit

Permalink
Merge pull request #244 from cgalibern/b2.1-cp-master
Browse files Browse the repository at this point in the history
B2.1 cp master
  • Loading branch information
cgalibern committed Jul 8, 2020
2 parents 563038f + 7ff9961 commit f50d43e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions opensvc/core/node/sunos.py
@@ -1,3 +1,5 @@
import os
import threading
import time

from utilities.proc import justcall
Expand All @@ -6,6 +8,10 @@


class Node(BaseNode):
@staticmethod
def get_tid():
return "%s.%s" % (os.getpid(), threading.current_thread().ident)

def sys_reboot(self, delay=0):
if delay:
self.log.info("sysrq reboot in %s seconds", delay)
Expand Down
1 change: 1 addition & 0 deletions opensvc/daemon/listener.py
Expand Up @@ -1781,6 +1781,7 @@ def router(self, nodename, data, stream_id=None, handler=None):
translate into a method name, and execute this method with options
passed as keyword args.
"""
self.parent.stats.sessions.alive[self.sid]['tid'] = shared.NODE.get_tid()
if not isinstance(data, dict):
return {"error": "invalid data format", "status": 1}
if "action" not in data:
Expand Down

0 comments on commit f50d43e

Please sign in to comment.