Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Process Hooks #27

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Add Process Hooks #27

wants to merge 15 commits into from

Conversation

virtualstaticvoid
Copy link
Owner

Adds before_started, after_completed and after_failed functionality.

E.g.

module MyProcess
  extend Taskinator::Definition

  # defines a process
  define_process do

    # define task to execute before process starts
    before_started :slack_notification

    # tasks, sub-process, etc.

    # define task to execute on completion
    after_completed :further_process

    # define task to execute on failure
    after_failed :email_notification

  end

  def slack_notification
    # ...
  end

  def further_process
    # ...
  end

  def email_notification
    # ...
  end

end

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant