[Blotter-commits] r925 - pkg/FinancialInstrument/inst/parser
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 15 17:26:45 CET 2012
Author: gsee
Date: 2012-02-15 17:26:44 +0100 (Wed, 15 Feb 2012)
New Revision: 925
Modified:
pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
Log:
put job.name in a text file so that it is easy to find out what job is being processed. (will be updated when any TRTH function is run)
Modified: pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R
===================================================================
--- pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R 2012-02-14 14:39:21 UTC (rev 924)
+++ pkg/FinancialInstrument/inst/parser/TRTH_BackFill.R 2012-02-15 16:26:44 UTC (rev 925)
@@ -182,6 +182,13 @@
registerDoMC(.TRTH$no.cores)
# registerDoSEQ()
+ # create a text file that contains the job.name so that if a job is running,
+ # someone other than the user that started the job can find out which job
+ # is running.
+ system(paste('echo "', Sys.time(), ' configureTRTH job.name: ', .TRTH$job.name, '" > ',
+ paste(.TRTH$path.output, "current.job.txt", sep=""),
+ sep=""))
+
assign('.TRTH', .TRTH, pos=.GlobalEnv)
.TRTH
}
@@ -193,6 +200,11 @@
if (inherits(.TRTH, 'try-error')) stop("Run configureTRTH function first")
}
+ # edit text file so others can see what job we're working on
+ system(paste('echo "', Sys.time(), ' download_reut job.name: ', .TRTH$job.name, '" > ',
+ paste(.TRTH$path.output, "current.job.txt", sep=""),
+ sep=""))
+
Sys.umask("0002")
Archive.output <- list.files(.TRTH$archive_dir)
@@ -298,6 +310,11 @@
splitCSV <- function(.TRTH) {
if (missing(.TRTH) && !exists(".TRTH")) stop("Run configureTRTH function first")
+ # edit text file so others can see what job we're working on
+ system(paste('echo "', Sys.time(), ' splitCSV job.name: ', .TRTH$job.name, '" > ',
+ paste(.TRTH$path.output, "current.job.txt", sep=""),
+ sep=""))
+
# make a temp dir to use for splitting so that (fingers crossed)
# more than one instance can be run at a time in separate R sessions.
dir.create(.TRTH$tmp_archive_dir <- addslash(tempdir()), showWarnings=FALSE, mode='0775')
@@ -519,6 +536,11 @@
if (!file.exists(.TRTH$csv_dir)) stop("There is no directory", paste(.TRTH$csv_dir))
if (is.null(.TRTH$files.xts)) stop("Cannot find 'files.xts' -- Run splitCSV first")
+ # edit text file so others can see what job we're working on
+ system(paste('echo "', Sys.time(), ' FEreut2xts job.name: ', .TRTH$job.name, '" > ',
+ paste(.TRTH$path.output, "current.job.txt", sep=""),
+ sep=""))
+
files.xts <- .TRTH$files.xts
oldTZ <- Sys.getenv("TZ")
More information about the Blotter-commits
mailing list