Skip to content

Commit 3abaa9f

Browse files
committed
Remove PLUGINS legacy code
1 parent 2d6179b commit 3abaa9f

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

src/Dagger.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ using Requires
1818
using MacroTools
1919
using TimespanLogging
2020

21-
const PLUGINS = Dict{Symbol,Any}()
22-
const PLUGIN_CONFIGS = Dict{Symbol,String}(
23-
:scheduler => "Dagger.Sch"
24-
)
25-
2621
include("lib/util.jl")
2722

2823
# Distributed data

src/compute.jl

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ runs the scheduler with the specified options. Returns a Chunk which references
2020
the result.
2121
"""
2222
function compute(ctx::Context, d::Thunk; options=nothing)
23-
scheduler = get!(PLUGINS, :scheduler) do
24-
get_type(PLUGIN_CONFIGS[:scheduler])
25-
end
26-
res = scheduler.compute_dag(ctx, d; options=options)
23+
result = Sch.compute_dag(ctx, d; options=options)
2724
if ctx.log_file !== nothing
2825
if ctx.log_sink isa TimespanLogging.LocalEventLog
2926
logs = TimespanLogging.get_logs!(ctx.log_sink)
@@ -34,12 +31,12 @@ function compute(ctx::Context, d::Thunk; options=nothing)
3431
@warn "Context log_sink not set to LocalEventLog, skipping"
3532
end
3633
end
37-
res
34+
result
3835
end
3936

4037
function debug_compute(ctx::Context, args...; profile=false, options=nothing)
41-
@time res = compute(ctx, args...; options=options)
42-
get_logs!(ctx.log_sink), res
38+
@time result = compute(ctx, args...; options=options)
39+
get_logs!(ctx.log_sink), result
4340
end
4441

4542
function debug_compute(arg; profile=false, options=nothing)
@@ -53,11 +50,7 @@ Base.@deprecate gather(x) collect(x)
5350

5451
cleanup() = cleanup(Context(global_context()))
5552
function cleanup(ctx::Context)
56-
if :scheduler in keys(PLUGINS)
57-
scheduler = PLUGINS[:scheduler]
58-
(scheduler).cleanup(ctx)
59-
delete!(PLUGINS, :scheduler)
60-
end
53+
Sch.cleanup(ctx)
6154
nothing
6255
end
6356

0 commit comments

Comments
 (0)