feat: new task pipeline runner

This commit is contained in:
Folke Lemaitre 2022-11-28 11:04:32 +01:00
parent 97f44f9f65
commit ab1b512545
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 427 additions and 298 deletions

View file

@ -50,7 +50,7 @@ function M:update()
if plugin.tasks then
for _, task in ipairs(plugin.tasks) do
self.progress.total = self.progress.total + 1
if not task.running then
if not task:is_running() then
self.progress.done = self.progress.done + 1
end
end
@ -215,7 +215,7 @@ function M:diagnostics(plugin)
end
end
for _, task in ipairs(plugin.tasks or {}) do
if task.running then
if task:is_running() then
self:diagnostic({
severity = vim.diagnostic.severity.WARN,
message = task.type .. (task.status == "" and "" or (": " .. task.status)),

View file

@ -25,7 +25,7 @@ return {
{
filter = function(plugin)
return has_task(plugin, function(task)
return task.running
return task:is_running()
end)
end,
title = "Working",