Tweak import placement to fix startup
i.e. per Continuum needs
This commit is contained in:
		
							parent
							
								
									9f21244ede
								
							
						
					
					
						commit
						2acc49be40
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -32,8 +32,6 @@ import logging | |||
| from rattail import commands | ||||
| from rattail.time import localtime, make_utc | ||||
| 
 | ||||
| from rattail_tempmon.db import Session as TempmonSession, model as tempmon | ||||
| 
 | ||||
| 
 | ||||
| log = logging.getLogger(__name__) | ||||
| 
 | ||||
|  | @ -62,6 +60,8 @@ class PurgeTempmon(commands.Subcommand): | |||
|                             "occur, but rollback (abort) the transaction at the end.") | ||||
| 
 | ||||
|     def run(self, args): | ||||
|         from rattail_tempmon.db import Session as TempmonSession, model as tempmon | ||||
| 
 | ||||
|         cutoff = localtime(self.config).date() - datetime.timedelta(days=args.keep) | ||||
|         cutoff = localtime(self.config, datetime.datetime.combine(cutoff, datetime.time(0))) | ||||
|         session = TempmonSession() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar