Skip to content

Commit

Permalink
Dispose of pre-existing tasks before loading in new overseer tasks wh…
Browse files Browse the repository at this point in the history
…en restoring from resession
  • Loading branch information
Jackaed committed Oct 9, 2024
1 parent 965f815 commit 315cce1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lua/resession/extensions/overseer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ end
M.on_load = function(data)
local overseer = require("overseer")
local config = require("overseer.config")
local task_list = require("overseer.task_list")
while true do
local task = task_list.get_by_index(1)
if task == nil then
break
end
task:dispose(true)
end
for _, params in ipairs(data) do
local task = overseer.new_task(params)
if config.bundles.autostart_on_load then
Expand Down

0 comments on commit 315cce1

Please sign in to comment.