code: function stopAppAfterCrash(message,crashes, cb){
      //TODO needs to stop apps in OPENSHIFT 3
      if(internalMsg) {
        var now = moment();
        var then = moment(crashes.stamp);
        var inTheLast = moment.duration(now.diff(then)).humanize();
        message.reason = "app crashed # " + crashes.crashes + " times in the last " + inTheLast; // e.g "5 minutes"
        message.severity = "terminated";
        internalMsg.publishTopic("fh-internal", "app.stop", message, function (err) {
          if (err) return handleError(err);
          logger.trace({msg: msg}, 'Published message');
        });
      }
    }
docs: helper