Keep current rattail config, when launching overnight task
at least i think this makes the most sense..?
This commit is contained in:
		
							parent
							
								
									2e4bb53d67
								
							
						
					
					
						commit
						151f92c00a
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -184,7 +184,7 @@ class LuigiHandler(GenericHandler):
 | 
			
		|||
        appdir = self.config.appdir()
 | 
			
		||||
        env = {
 | 
			
		||||
            'PYTHONPATH': appdir,
 | 
			
		||||
            'RATTAIL_CONFIG_FILES': os.path.join(appdir, 'silent.conf'),
 | 
			
		||||
            'RATTAIL_CONFIG_FILES': os.pathsep.join(self.config.files_read),
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        # build our command, which will vary per caller request.  by
 | 
			
		||||
| 
						 | 
				
			
			@ -198,7 +198,6 @@ class LuigiHandler(GenericHandler):
 | 
			
		|||
            # rattail overnight <task>
 | 
			
		||||
            cmd = [
 | 
			
		||||
                '{}/bin/rattail'.format(sys.prefix),
 | 
			
		||||
                '--config', '{}/silent.conf'.format(appdir),
 | 
			
		||||
                '--no-versioning',
 | 
			
		||||
                'overnight', '-k', task['key'],
 | 
			
		||||
                '--date={}'.format(date),
 | 
			
		||||
| 
						 | 
				
			
			@ -234,7 +233,6 @@ class LuigiHandler(GenericHandler):
 | 
			
		|||
            # rattail run-n-mail 'task command'
 | 
			
		||||
            cmd = [
 | 
			
		||||
                os.path.join(sys.prefix, 'bin', 'rattail'),
 | 
			
		||||
                '--config', os.path.join(appdir, 'silent.conf'),
 | 
			
		||||
                '--no-versioning',
 | 
			
		||||
                'run-n-mail',
 | 
			
		||||
                '--keep-exit-code',
 | 
			
		||||
| 
						 | 
				
			
			@ -247,6 +245,7 @@ class LuigiHandler(GenericHandler):
 | 
			
		|||
                cmd.append('--skip-if-empty')
 | 
			
		||||
 | 
			
		||||
        # log final command
 | 
			
		||||
        log.debug("env is: %s", env)
 | 
			
		||||
        log.debug("launching command in subprocess: %s", cmd)
 | 
			
		||||
        if dry_run:
 | 
			
		||||
            log.debug("dry-run mode, so aborting")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue