aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/monitor.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/python/monitor.py b/python/monitor.py
deleted file mode 100644
index 51fada8f..00000000
--- a/python/monitor.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import os
-import time
-import subprocess
-import datetime
-from common import root
-from db import conn
-from intex_scenarios import generate_scenarios
-
-Rpath = os.path.join(common.root, "code", "R")
-logpath = os.path.join(common.root, "logs")
-dealsfile = os.path.join(common.root, "scripts", "deals_to_price.txt")
-
-args1 = ["Rscript", "--vanilla", os.path.join(Rpath, "build_portfolios.R")]
-args2 = ["Rscript", "--vanilla", os.path.join(Rpath, "build_scenarios.R")]
-
-while True:
- workdate = str(datetime.date.today())
- if os.path.exists(dealsfile):
- with open(os.path.join(dealsfile)) as fh:
- dealnames = [line.split("\t")[0] for line in fh]
- with open(os.path.join(logpath, "build_portfolios.Rout"), "w") as fh:
- subprocess.call(args1, stderr = subprocess.STDOUT, stdout = fh)
- with open(os.path.join(logpath, "build_scenarios.Rout"), "w") as fh:
- subprocess.call(args2, stderr = subprocess.STDOUT, stdout = fh)
- for dealname in dealnames:
- generate_scenarios(workdate, dealname)
- time.sleep(3)
-conn.close()