public static void Main(string[] args) { var arguments = Arguments.arguments(args, jStrings("group", "start", "end", "dir", "asOf", "metricSource", "overwrite")); var groupName = arguments.@string("group"); var start = date(arguments.get("start", jDate("1990/01/01"))); var end = date(arguments.get("end", Dates.midnight())); if (arguments.containsKey("asOf")) { freezeNow(date(arguments.date("asOf"))); } var metricSource = arguments.containsKey("metricSource") ? new DataSource(arguments.@string("metricSource")) : null; var dir = new QDirectory(arguments.get("dir")); dir.createIfMissing(); var group = Groups.GROUPS.forName(groupName); var overwrite = arguments.get("overwrite", false); Bomb.unless(overwrite || isEmpty(dir.files()), () => dir.path() + " contains existing files and overwrite is false!"); writeGroupXml(dir, group, start, end); var liveMarkets = list <MsivPv>(Groups.GROUPS.liveMarkets(groupName)); var marketsBySystem = new Dictionary <LiveSystem, List <JMarket> >(); each(liveMarkets, liveMarket => marketsBySystem[liveMarket.liveSystem()] = new List <JMarket>()); each(liveMarkets, liveMarket => marketsBySystem[liveMarket.liveSystem()].Add(new JMarket(liveMarket.market()))); each(marketsBySystem, (system, markets) => generateCurves(system, markets, dir, start, end, metricSource)); Environment.Exit(0); }
protected override void OnStart(string[] args) { LogC.useJavaLog = true; LogC.setOut("launcher", @"C:\logs\Bootstrap.log", true); LogC.setVerboseLoggingForever(true); STARTUP.subscribe(startProcesses); SHUTDOWN.subscribe(stopProcesses); heart = new Heartbeat(LOCAL_CLOUD_BROKER, "Tornado.heartbeat.bootstrap", 3000); heart.initiate(); var juggernet = new QDirectory("T:\\JuggerNET\\"); if (!juggernet.exists()) { LogC.info("can't access network drives, try running on a different system or as a different user(change service logon to use FFTW\\<username>) " + juggernet.path() + " running as " + O.username()); } }
public void createDirectories() { tempDir.createIfMissing(); LogC.makeOldDir(metricsDir.path()); }