2323f1102e885cbb8bcc967248249ebb41ce3362,poseidon/poseidonStorage/poseidonStorage.py,poseidonStorage,__init__,#poseidonStorage#,49
Before Change
self.modName = "poseidonStorage"
database_container_ip = ""
if "DOCKER_HOST" in environ:
database_container_ip = environ["DOCKER_HOST"]
if not database_container_ip:
// did not find env variable DOCKER_HOST
try:
self.config = ConfigParser.ConfigParser()
After Change
self.modName = "poseidonStorage"
database_container_ip = ""
if "DOCKER_IP" in environ:
if "/" in environ["DOCKER_IP"]:
database_container_ip = urlparse(environ["DOCKER_IP"]).hostname
else:
database_container_ip = environ["DOCKER_IP"]
else:
// did not find env variable DOCKER_IP
try:
self.config = ConfigParser.ConfigParser()
self.config.readfp(
open("/poseidonWork/templates/config.template"))
database_container_ip = self.config.get("database", "ip")
except:
raise ValueError(
"poseidonStorage: could not find database ip address.")
self.client = MongoClient(host=database_container_ip, port=27017)
// create db named "poseidon_records" (NOTE: db will not actually be
// created until first doc write).
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: CyberReboot/poseidon
Commit Name: 2323f1102e885cbb8bcc967248249ebb41ce3362
Time: 2016-08-16
Author: tlanham@cs.stanford.edu
File Name: poseidon/poseidonStorage/poseidonStorage.py
Class Name: poseidonStorage
Method Name: __init__
Project Name: pantsbuild/pants
Commit Name: 0c099396ea3f96919b3e613b16b399516e446c16
Time: 2015-10-05
Author: tansy.arron@gmail.com
File Name: src/python/pants/cache/cache_setup.py
Class Name: CacheFactory
Method Name: select_best_url
Project Name: streamlit/streamlit
Commit Name: b88730f4cdf5f2abf5b48c9eae42567b61e7d549
Time: 2018-12-12
Author: thiagot@gmail.com
File Name: lib/streamlit/proxy/proxy_util.py
Class Name:
Method Name: url_is_from_allowed_origins
Project Name: quiltdata/quilt
Commit Name: b4cb0c14ebf600daa5573bc90a419eb24329eb55
Time: 2019-06-05
Author: aleksey@residentmar.io
File Name: api/python/quilt3/packages.py
Class Name: Package
Method Name: install
Project Name: CyberReboot/poseidon
Commit Name: b27bd78e64455e189355a4d297fc5f6d1945c730
Time: 2016-08-15
Author: tlanham@cs.stanford.edu
File Name: poseidon/poseidonStorage/poseidonStorage.py
Class Name: poseidonStorage
Method Name: __init__