-
Notifications
You must be signed in to change notification settings - Fork 0
DependencyQueueClass
github-actions[bot] edited this page Nov 24, 2024
·
4 revisions
Instantiates a new dependency queue for use with DependencyClass. When the queue is executed, it will install all the dependencies in the order they are given.
Parameters
-
packages
(table
) - A table of dependency objects, each with aname
andurl
property. -
cb
(function
) - A callback function that will be called with two arguments:success
anderror
.
Examples
local queue = DependencyQueueClass.new_dependency_queue({
{ name = "package_1", url = "https://example.com/package_1" },
{ name = "package_2", url = "https://example.com/package_2" },
}, function(success, error)
if success then
cecho("All dependencies installed successfully.\n")
else
cecho(f "Failed to install dependencies: {error}\n")
end
end)
-- Alternate syntax
local queue = glu.dependency_queue(...)
Starts the dependency queue after it has been created. The callback will be called once all the dependencies have been installed or if there was an error.
Examples
local queue = glu.dependency_queue.new_dependency_queue(...)
queue:start()
Documentation generated with Gludoc.