Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/core/federer_handlers/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def log_worker(self, msgid, window_start, window_end, log_name):
}
files = {'file': open(tmp_file, 'rb')}
r = requests.post(self.conf['registry'] + "/bts/logfile", data=params,
files=files, headers=self.ic.auth_header)
files=files, headers=self.ic.auth_header, timeout=60)
try:
if r.status_code == 200:
logger.info("Log req %s posted successfully" % msgid)
Expand Down
2 changes: 1 addition & 1 deletion client/core/federer_handlers/sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ def sms_worker(self, to, from_num, from_name, body, service_type):
"destination": to,
"service_type": service_type
}
requests.post(billing_url, data=params)
requests.post(billing_url, data=params, timeout=60)
except Exception as e:
logger.error("Endaga " + traceback.format_exc(e))
4 changes: 2 additions & 2 deletions client/core/interconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def register_subscriber(self, imsi):
data={
'imsi': imsi,
'bts_uuid': snowflake.snowflake()
})
}, timeout=60)
except BaseException as e: # log and rethrow
logger.error("Endaga: Register network error: %s." % e)
raise
Expand Down Expand Up @@ -105,7 +105,7 @@ def send(self, to, from_, body, to_country=None, from_country=None):
# TODO(matt): use urlparse.urljoin here?
endpoint = self.conf['registry'] + "/send/"
try:
r = requests.post(endpoint, headers=self.auth_header, data=message)
r = requests.post(endpoint, headers=self.auth_header, data=message, timeout=60)
except BaseException as e: # log and rethrow as it was before
logger.error("Endaga: Send SMS network error: %s." % e)
raise
Expand Down
2 changes: 1 addition & 1 deletion cloud/ansible/files/monitors/etage_freeswitch_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ def count_active_calls(dp):
datapoints = []
check_sofia_status(datapoints)
count_active_calls(datapoints)
requests.post(ODS_URL, data={'datapoints': json.dumps(datapoints)})
requests.post(ODS_URL, data={'datapoints': json.dumps(datapoints)}, timeout=60)
2 changes: 1 addition & 1 deletion cloud/certifier/scripts/gen_csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
params = {
'bts_uuid': iden
}
r = requests.get("http://127.0.0.1:8080/api/v1/bts/sslconf", params=params)
r = requests.get("http://127.0.0.1:8080/api/v1/bts/sslconf", params=params, timeout=60)
if (r.status_code != 200):
raise Exception("Unable to generate ssl conf")

Expand Down
4 changes: 2 additions & 2 deletions cloud/endagaweb/checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def sas_acquire(band, chnl, pwr_lvl):
'band': band,
'channel': chnl,
'power_level': pwr_lvl,
})
}, timeout=60)
except Exception:
logging.error('SASON Acquire failed')
return None
Expand All @@ -440,7 +440,7 @@ def sas_request():
'long': self.bts.longitude,
# self for now -kurtis
'bands': self.bts.band,
})
}, timeout=60)
except Exception:
logging.error('SASON Request failed')
return None
Expand Down
2 changes: 1 addition & 1 deletion cloud/endagaweb/ic_providers/kannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ def send(self, to, from_, body, to_country=None, from_country=None):
'text' : body
}

r = requests.get(self.outbound_sms_url, params=request)
r = requests.get(self.outbound_sms_url, params=request, timeout=60)

return (r.status_code >= 200 and r.status_code < 300)