示例#1
0
 def get_data(self):
     return {
         'started': psshutil.convert_task_time(self.timestamp).isoformat(),
         'host': self.host,
         'command': self.raw_cmd,
         'stdout': self.outputbuffer,
         'stderr': self.errorbuffer,
         'exitcode': self.exitstatus
     }
示例#2
0
 def get_data(self):
     return {
         "started": psshutil.convert_task_time(self.timestamp).isoformat(),
         "host": self.host,
         "name": self.name,
         "command": self.raw_cmd,
         "stdout": self.outputbuffer,
         "stderr": self.errorbuffer,
         "exitcode": self.exitstatus,
     }
示例#3
0
 def capture_data(self, task):
     started = psshutil.convert_task_time(task.timestamp).isoformat()
     entries = (None, started, task.host, task.raw_cmd, task.outputbuffer, task.errorbuffer, task.exitstatus)
     self.insert('tasks', entries)
     self.conn.commit()
示例#4
0
 def capture_data(self, task):
     started = psshutil.convert_task_time(task.timestamp).isoformat()
     entries = (None, started, task.host, task.raw_cmd, task.outputbuffer,
                task.errorbuffer, task.exitstatus)
     self.insert('tasks', entries)
     self.conn.commit()