Remove use of feature flags originating in upstream provided example. Remove unneeded main function.
This commit is contained in:
		
							parent
							
								
									f0ab3a274b
								
							
						
					
					
						commit
						e8e2319a68
					
				
					 1 changed files with 0 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -5,7 +5,6 @@ use tracing::{error, info, warn};
 | 
			
		|||
use uuid::Uuid;
 | 
			
		||||
 | 
			
		||||
pub async fn run_example(sched: &mut JobScheduler) -> Result<Vec<Uuid>, JobSchedulerError> {
 | 
			
		||||
    #[cfg(feature = "signal")]
 | 
			
		||||
    sched.shutdown_on_ctrl_c();
 | 
			
		||||
 | 
			
		||||
    sched.set_shutdown_handler(Box::new(|| {
 | 
			
		||||
| 
						 | 
				
			
			@ -181,7 +180,6 @@ pub async fn run_example(sched: &mut JobScheduler) -> Result<Vec<Uuid>, JobSched
 | 
			
		|||
    let jhb_job_guid = jhb_job.guid();
 | 
			
		||||
    sched.add(jhb_job).await.unwrap();
 | 
			
		||||
 | 
			
		||||
    #[cfg(feature = "english")]
 | 
			
		||||
    let english_job_guid = {
 | 
			
		||||
        let english_job = JobBuilder::new()
 | 
			
		||||
            .with_timezone(Utc)
 | 
			
		||||
| 
						 | 
				
			
			@ -220,7 +218,6 @@ pub async fn run_example(sched: &mut JobScheduler) -> Result<Vec<Uuid>, JobSched
 | 
			
		|||
        jja_guid,
 | 
			
		||||
        utc_job_guid,
 | 
			
		||||
        jhb_job_guid,
 | 
			
		||||
        #[cfg(feature = "english")]
 | 
			
		||||
        english_job_guid,
 | 
			
		||||
    ];
 | 
			
		||||
    Ok(ret)
 | 
			
		||||
| 
						 | 
				
			
			@ -243,10 +240,6 @@ pub async fn stop_example(
 | 
			
		|||
    Ok(())
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
fn main() {
 | 
			
		||||
    eprintln!("Should not be run on its own.");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[cfg(test)]
 | 
			
		||||
mod test {
 | 
			
		||||
    use tokio_cron_scheduler::{Job, JobScheduler};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue