Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert jobs using the new queue #3367

Open
wants to merge 3 commits into
base: quenting/new-queue/initial
Choose a base branch
from

Conversation

sandhose
Copy link
Member

@sandhose sandhose commented Oct 15, 2024

On top of #3307

This removes apalis, and insert jobs in the new queue. This doesn't yet process those new jobs

Copy link

cloudflare-workers-and-pages bot commented Oct 15, 2024

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4cbd066
Status: ✅  Deploy successful!
Preview URL: https://7bbdbeb5.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-new-queue-insert-jo.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose force-pushed the quenting/new-queue/insert-jobs branch from 8aab159 to 28d01c0 Compare October 31, 2024 16:39
@sandhose sandhose marked this pull request as ready for review October 31, 2024 17:09
@sandhose sandhose force-pushed the quenting/new-queue/insert-jobs branch from 28d01c0 to c3237ce Compare October 31, 2024 17:14
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

fn queue_worker<'c>(
&'c mut self,
) -> Box<dyn mas_storage::queue::QueueWorkerRepository<Error = Self::Error> + 'c> {
Box::new(PgQueueWorkerRepository::new(self.conn.as_mut()))
}

fn queue_job<'c>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...job_queue? Minor but queue is also a verb, so this sounds like it's enqueuing a job...

Copy link
Member Author

@sandhose sandhose Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also wasn't sure, but I try to keep the repository names close to the related table names 🤷

.fetch_one(&pool)
.await
.expect("Deactivation job to be scheduled");
let job: Json<serde_json::Value> = sqlx::query_scalar(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL query_scalar

@sandhose sandhose force-pushed the quenting/new-queue/insert-jobs branch from c3237ce to 36921bd Compare November 19, 2024 16:27
@sandhose sandhose added the A-Jobs Related to asynchronous jobs label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Jobs Related to asynchronous jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants