Skip to content

Commit

Permalink
Removed unnecessary logging
Browse files Browse the repository at this point in the history
  • Loading branch information
phuongdh committed Feb 12, 2014
1 parent 46300b8 commit ba96ef3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 0 additions & 4 deletions lib/avalon/workflow/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ def to_a
end

def template(step)
logger.debug "<< TEMPLATE >>"
logger.debug "<< @_states[#{step}] >>"
logger.debug "<< #{@_states[step]} >>"

target_step = @_states[step]
target_step.template
end
Expand Down
9 changes: 2 additions & 7 deletions lib/avalon/workflow/workflow_datastream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,11 @@ def completed?(step_name)
def current?(step_name)
current = case
when HYDRANT_STEPS.first?(step_name)
logger.debug "<< Option 1 >>"
last_completed_step.first.empty?
when HYDRANT_STEPS.exists?(step_name)
logger.debug "<< Option 2 >>"
previous_step = HYDRANT_STEPS.previous(step_name)
(last_completed_step.first == previous_step.step)
else
logger.debug "<< Option 3 >>"
false
end

Expand All @@ -102,6 +99,7 @@ def advance
lcs = (last_completed_step.is_a? Array) ? last_completed_step.first : last_completed_step

if (lcs.blank? or not HYDRANT_STEPS.exists?(lcs))
logger.warn "<< Step #{lcs} invalid, defaulting to first step >>"
self.last_completed_step = HYDRANT_STEPS.first.step
elsif (not HYDRANT_STEPS.last?(lcs))
next_step = HYDRANT_STEPS.next(lcs).step
Expand All @@ -116,14 +114,11 @@ def publish
end

def update_status(active_step=nil)
logger.debug "<< UPDATE_INGEST_STATUS >>"

logger.debug "<< UPDATE_INGEST_STATUS >>"
active_step = active_step || last_completed_step.first
logger.debug "<< COMPLETED : #{completed?(active_step)} >>"

if current?(active_step) and not published?
logger.debug "<< ADVANCING to the next step in the workflow >>"
logger.debug "<< #{active_step} >>"
advance
end

Expand Down

0 comments on commit ba96ef3

Please sign in to comment.