Skip to content

Commit

Permalink
do not store jobs that do not need to be logged in smw
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fiers committed Aug 3, 2012
1 parent 7036115 commit 803c7ec
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/python/moa/plugin/job/smw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ def hook_finish(job):
#only save is this directory continas a moa job
return

fwd = os.path.abspath(job.wd)

#do not save anything in an '/tmp/' path
if '/tmp/' in fwd:
return

#do not save jobs if they're not spposed to log
if not sysConf.commands.get(sysConf.args.command, {})\
.get('logJob', False):
return

pid = os.fork()
if pid != 0:
#parent process - return now
Expand Down

0 comments on commit 803c7ec

Please sign in to comment.