woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.3k stars 371 forks source link

Do not require agent polling to make workflows that should be skipped done #4271

Open 6543 opened 3 weeks ago

6543 commented 3 weeks ago

currently we have in the task poll logic an check that clean up the queue of tasks that should be skipped. so it requires agents to poll to actually do stuff.

but the agent poll logic should ignore all tasks that are not ready to run and the queue maintenance should happen in an dedicated place.

this pull starts to refactor this by at least move it in it's own function and go routine in the background.

6543 commented 2 weeks ago

todo: check that "virtual" agent is neither in database nor in webui/api visible

6543 commented 2 weeks ago

PS: once we refactored more of the queue related code we might have a chance to simplify it :)