fix: making sure the log was sent before setting the status
This commit is contained in:
		
							parent
							
								
									ffe0f98360
								
							
						
					
					
						commit
						72fee51d32
					
				@ -259,7 +259,6 @@ def update_run(prompt_id, status: Status):
 | 
			
		||||
            "run_id": prompt_id,
 | 
			
		||||
            "status": status.value,
 | 
			
		||||
        }
 | 
			
		||||
        prompt_metadata[prompt_id]['status'] = status
 | 
			
		||||
        print(f"Status: {status.value}")
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
@ -297,6 +296,8 @@ def update_run(prompt_id, status: Status):
 | 
			
		||||
            error_type = type(e).__name__
 | 
			
		||||
            stack_trace = traceback.format_exc().strip()
 | 
			
		||||
            print(f"Error occurred while updating run: {e} {stack_trace}")
 | 
			
		||||
        finally:
 | 
			
		||||
            prompt_metadata[prompt_id]['status'] = status
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
async def upload_file(prompt_id, filename, subfolder=None, content_type="image/png", type="output"):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user