don't queue heartbeats when they will never be valid
This commit is contained in:
parent
76b745c44e
commit
01689a2ef5
1 changed files with 9 additions and 6 deletions
|
@ -310,6 +310,7 @@ def send_action(project=None, branch=None, stats=None, key=None, targetFile=None
|
||||||
if log.isEnabledFor(logging.DEBUG):
|
if log.isEnabledFor(logging.DEBUG):
|
||||||
exception_data['traceback'] = traceback.format_exc()
|
exception_data['traceback'] = traceback.format_exc()
|
||||||
if offline:
|
if offline:
|
||||||
|
if response is not None and response.getcode() != 400 and response.getcode() != 401:
|
||||||
queue = Queue()
|
queue = Queue()
|
||||||
queue.push(data, plugin)
|
queue.push(data, plugin)
|
||||||
if log.isEnabledFor(logging.DEBUG):
|
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):
|
if log.isEnabledFor(logging.DEBUG):
|
||||||
exception_data['traceback'] = traceback.format_exc()
|
exception_data['traceback'] = traceback.format_exc()
|
||||||
if offline:
|
if offline:
|
||||||
|
if response is not None and response.getcode() != 400 and response.getcode() != 401:
|
||||||
queue = Queue()
|
queue = Queue()
|
||||||
queue.push(data, plugin)
|
queue.push(data, plugin)
|
||||||
if 'unknown url type: https' in u(sys.exc_info()[1]):
|
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_code = response.getcode() if response is not None else None
|
||||||
response_content = response.read() if response is not None else None
|
response_content = response.read() if response is not None else None
|
||||||
if offline:
|
if offline:
|
||||||
|
if response is not None and response.getcode() != 400 and response.getcode() != 401:
|
||||||
queue = Queue()
|
queue = Queue()
|
||||||
queue.push(data, plugin)
|
queue.push(data, plugin)
|
||||||
if log.isEnabledFor(logging.DEBUG):
|
if log.isEnabledFor(logging.DEBUG):
|
||||||
|
|
Loading…
Reference in a new issue