-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stop any weird errors occuring if the log location contains spaces
- Loading branch information
Scott Warchal
authored and
Scott Warchal
committed
Feb 13, 2018
1 parent
7a6f8ff
commit 110be16
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,12 +198,12 @@ def make_logfile_text(logfile_location, job_file, n_tasks): | |
fi | ||
LOG_FILE_LOC={logfile_location}/{job_file}.log | ||
echo "`date +"%Y%m%d %H:%M"` $JOB_ID $SGE_TASK_ID $RETURN_STATUS" >> $LOG_FILE_LOC | ||
NUM_FINISHED_JOBS=$(cat $LOG_FILE_LOC | wc -l) | ||
echo "`date +"%Y-%m-%d %H:%M"` "$JOB_ID" "$SGE_TASK_ID" "$RETURN_STATUS"" >> "$LOG_FILE_LOC" | ||
# if the final job has finished then send an email to the user | ||
NUM_FINISHED_JOBS=$(cat "$LOG_FILE_LOC" | wc -l) | ||
if [[ $NUM_FINISHED == {n_tasks} ]]; then | ||
echo "" | mailx -s "cptools2: {job_file} analysis completed successfully "[email protected]"" | ||
echo "" | mailx -s "cptools2: {job_file} analysis completed" ""[email protected]" | ||
fi | ||
""".format(logfile_location=logfile_location, | ||
job_file=job_file, | ||
|