Files
POC-to-ModbusTCP/poc_scraper/__init__.py
2017-03-27 18:11:55 -05:00

17 lines
339 B
Python

from plc_to_mongo import PLC_to_Mongo
from os import getenv
from sys import exit
PLC_IP_ADDRESS = getenv("PLC_IP_ADDRESS")
if not PLC_IP_ADDRESS:
exit("No PLC_IP_ADDRESS set in the environment variables")
def main():
scraper_thread = PLC_to_Mongo(PLC_IP_ADDRESS)
scraper_thread.run()
if __name__ == '__main__':
main()