diff options
| author | 2018-07-05 16:52:48 +0200 | |
|---|---|---|
| committer | 2018-07-05 16:52:48 +0200 | |
| commit | 400d163bf581de2c3aee26aceebb9af470d8e54a (patch) | |
| tree | eda2369c7c26c2e090b83c695a646656b147744a | |
| parent | install dockker in the ci image (diff) | |
remove excessive logging and attempt getting stacktrace
| -rw-r--r-- | config.py | 3 | ||||
| -rw-r--r-- | rmq.py | 4 | ||||
| -rw-r--r-- | snekbox.py | 10 | 
3 files changed, 7 insertions, 10 deletions
| @@ -19,7 +19,8 @@ def autodiscover():              continue          except Exception: -            print(traceback.format_exc()) +            pass +            #print(traceback.format_exc())      return '127.0.0.1' @@ -116,10 +116,6 @@ class Rmq(object):                      properties=self.properties)                  if result: -                    log.info((f"published: {self.host} " -                              f"queue: {queue} " -                              f"message: {message}")) -                      return result                  else: @@ -60,7 +60,11 @@ class Snekbox(object):          elif proc.returncode == 1:              try: -                output = stderr.split('\n')[-2] +                filtered = [] +                for line in stderr.split('\n'): +                    if not line.startswith('['): +                        filtered.append(line) +                output = '\n'.join(filtered)              except IndexError:                  output = '' @@ -71,14 +75,12 @@ class Snekbox(object):              output = 'permission denied (root required)'          else: -            log.debug(stderr)              output = 'unknown error'          return output      def execute(self, body):          msg = body.decode('utf-8') -        log.info(f'incoming: {msg}')          result = ''          snek_msg = json.loads(msg)          snekid = snek_msg['snekid'] @@ -86,8 +88,6 @@ class Snekbox(object):          result = self.python3(snekcode) -        log.info(f'outgoing: {result}') -          rmq.publish(result,                      queue=snekid,                      routingkey=snekid, | 
