don't queue heartbeats when they will never be valid

This commit is contained in:
Alan Hamlett 2014-12-15 11:59:49 -06:00
parent 76b745c44e
commit 01689a2ef5

View file

@ -310,6 +310,7 @@ def send_action(project=None, branch=None, stats=None, key=None, targetFile=None
if log.isEnabledFor(logging.DEBUG):
exception_data['traceback'] = traceback.format_exc()
if offline:
if response is not None and response.getcode() != 400 and response.getcode() != 401:
queue = Queue()
queue.push(data, plugin)
if log.isEnabledFor(logging.DEBUG):
@ -327,6 +328,7 @@ def send_action(project=None, branch=None, stats=None, key=None, targetFile=None
if log.isEnabledFor(logging.DEBUG):
exception_data['traceback'] = traceback.format_exc()
if offline:
if response is not None and response.getcode() != 400 and response.getcode() != 401:
queue = Queue()
queue.push(data, plugin)
if 'unknown url type: https' in u(sys.exc_info()[1]):
@ -348,6 +350,7 @@ def send_action(project=None, branch=None, stats=None, key=None, targetFile=None
response_code = response.getcode() if response is not None else None
response_content = response.read() if response is not None else None
if offline:
if response is not None and response.getcode() != 400 and response.getcode() != 401:
queue = Queue()
queue.push(data, plugin)
if log.isEnabledFor(logging.DEBUG):