25 lines
536 B
Python
25 lines
536 B
Python
#!/usr/bin/env python
|
|
|
|
import sys
|
|
sys.path.append('/home/price-collector/')
|
|
|
|
from threading import Thread
|
|
from pricing.collector import collectorMain
|
|
|
|
from probes.probes import runFlaskProbes
|
|
|
|
def callCollector(args):
|
|
collectorMain(args)
|
|
|
|
def callProbes():
|
|
runFlaskProbes()
|
|
|
|
if __name__=='__main__':
|
|
|
|
Thread(target=callProbes).start()
|
|
|
|
# Dynamically create new child for each currency
|
|
currencies = [ "btc_usd" ]
|
|
|
|
for i in range(len(currencies)):
|
|
Thread(target=callCollector, args=[currencies[i]]).start() |