Skip to content

Commit

Permalink
Comment methods , , &
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Aug 21, 2021
1 parent 93ce137 commit cec9535
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/graph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using LightGraphs:
src,
dst

export Workflow, dependencies, , , ,
export Workflow, dependencies,

const DEPENDENCIES = Dict{Job,Vector{AtomicJob}}()

Expand Down Expand Up @@ -75,29 +75,29 @@ end
(x::AndJobs, y::Job) = x.b y
(x::Job, y::AndJobs) = x y.a

function (x::Job, ys::Job...)
if x in ys
throw(ArgumentError("a job cannot have itself as a dependency!"))
else
for y in ys
x y
end
end
end
# function ⋲(x::Job, ys::Job...)
# if x in ys
# throw(ArgumentError("a job cannot have itself as a dependency!"))
# else
# for y in ys
# x → y
# end
# end
# end

function (xs::Job...)
@assert length(xs) >= 2
y = last(xs)
for x in xs[1:end-1]
x y
end
end
# function ⋺(xs::Job...)
# @assert length(xs) >= 2
# y = last(xs)
# for x in xs[1:end-1]
# x → y
# end
# end

function (xs::Job...)
@assert length(xs) >= 3
(first(xs), xs[2:end-1]...)
(xs[2:end]...)
end
# function ⋄(xs::Job...)
# @assert length(xs) >= 3
# ⋲(first(xs), xs[2:end-1]...)
# ⋺(xs[2:end]...)
# end

function run!(w::Workflow)
for job in w.nodes # The nodes have been topologically sorted.
Expand Down

0 comments on commit cec9535

Please sign in to comment.