bors icon indicating copy to clipboard operation
bors copied to clipboard

Implement refresh mechanism for unknown mergeable PRs

Open Sakib25800 opened this issue 9 months ago • 2 comments

Fixes #218

This PR:

  • Adds mergeable queue processing on periodic refresh

Sakib25800 avatar Mar 24 '25 03:03 Sakib25800

@Kobzol could you take a quick look to make sure I'm on the right track on how I've implemented the background processing for the mergeable queue?

You can ignore the logic and what actually happens right now since it's very much a WIP, but I want to make sure I'm going about the actual queue task implementation correctly.

Sakib25800 avatar Mar 31 '25 15:03 Sakib25800

Yeah, I think that's mostly fine. I would use a "native" queue from tokio, rather than implementing it with a Mutex + sleep, that's unnecessary and hacky. Also waiting 10 secs for the item to be processed in tests would be annoying.

Also I would split this into multiple PRs:

  • Introduce the queue and the processing loop, push to the queue after pushes to the base branch.
  • Also push to the queue in the refresh handler.

Kobzol avatar Apr 01 '25 11:04 Kobzol