feat(core): add heartbeat handling
This commit is contained in:
		
							parent
							
								
									103699ec36
								
							
						
					
					
						commit
						36400afab4
					
				|  | @ -58,6 +58,7 @@ impl<'a> funnel::Source<'a> for UISource<'a> { | |||
|         UIEvent::ContextMenuClick(context_item_id) => { | ||||
|           EventType::ContextMenuClicked(ContextMenuClickedEvent { context_item_id }) | ||||
|         } | ||||
|         UIEvent::Heartbeat => EventType::Heartbeat, | ||||
|       }, | ||||
|     } | ||||
|   } | ||||
|  |  | |||
|  | @ -157,6 +157,7 @@ fn worker_main(args: CliModuleArgs) -> i32 { | |||
|     .run(Box::new(move |event| { | ||||
|       if let Err(error) = engine_ui_event_sender.send(event) { | ||||
|         error!("unable to send UIEvent to engine: {}", error); | ||||
|         panic!("broken UI->Engine channel"); | ||||
|       } | ||||
|     })) | ||||
|     .expect("unable to run main eventloop"); | ||||
|  |  | |||
|  | @ -50,6 +50,7 @@ pub enum EventType { | |||
|   ProcessingError(String), | ||||
|   ExitRequested(ExitMode), | ||||
|   Exit(ExitMode), | ||||
|   Heartbeat, | ||||
|   
 | ||||
|   // Inputs
 | ||||
|   Keyboard(input::KeyboardEvent), | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user