Here are the examples of the python api django.conf.settings.AGENT_PORT taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Source : signals.py
with MIT License
from stolos
with MIT License
from stolos
def post_deletion_cleanup(sender, instance, **kwargs):
agent_host = instance.server.host
agent_url = 'http://' + agent_host + ':' + str(settings.AGENT_PORT)
cleanup_url = join(agent_url, 'api/v1.0/cleanup/')
auth = requests.auth.HTTPBasicAuth(
username=settings.AGENT_USERNAME, password=settings.AGENT_PASSWORD
)
session = requests.Session()
session.mount('http://', requests.adapters.HTTPAdapter(max_retries=3))
request = session.post(cleanup_url, auth=auth, json={'uuid': str(instance.uuid)})