pub async fn run(&self) -> Result<OwnedHandle, sqlx::Error> {
        let options = self.clone();
        let job_runner = Arc::new(JobRunner {
            options,
            running_jobs: AtomicUsize::new(0),
            notify: Notify::new(),
        });
        let listener_task = start_listener(job_runner.clone()).await?;
        Ok(OwnedHandle::new(task::spawn(main_loop(
            job_runner,
            listener_task,
        ))))
    }
/// Start the job runner in the background. The job runner will stop when the
/// returned handle is dropped.
Start the job runner in the background. The job runner will stop when the
returned handle is dropped.
Start the job runner in the background . The job runner will stop when the returned handle is dropped .
pub async fn run(&self) -> Result<OwnedHandle, sqlx::Error> {
        let options = self.clone();
        let job_runner = Arc::new(JobRunner {
            options,
            running_jobs: AtomicUsize::new(0),
            notify: Notify::new(),
        });
        let listener_task = start_listener(job_runner.clone()).await?;
        Ok(OwnedHandle::new(task::spawn(main_loop(
            job_runner,
            listener_task,
        ))))
    }
pub async fn run ( & self ) -> Result < OwnedHandle , sqlx :: Error > { let options = self . clone ( ) ; let job_runner = Arc :: new ( JobRunner { options , running_jobs : AtomicUsize :: new ( 0 ) , notify : Notify :: new ( ) , } ) ; let listener_task = start_listener ( job_runner . clone ( ) ) . await ? ; Ok ( OwnedHandle :: new ( task :: spawn ( main_loop ( job_runner , listener_task , ) ) ) ) }
Start the job runner in the background.
Start the job runner in the background .
&self
&self