Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Latest commit

 

History

History
51 lines (41 loc) · 1.35 KB

README.md

File metadata and controls

51 lines (41 loc) · 1.35 KB

NTSWF

Not That Simple Workflow - A layer around AWS SWF

Common denominator of our infopark internal services using AWS Simple Workflow.

Gem Version Code Climate Dependency Status Build Status

Usage

Gemfile

gem 'ntswf', '~> 2.0'

Client

config = {domain: 'my_domain', unit: 'my_app'} # ...
Ntswf.create(:client, config).start_execution(
  execution_id: 'my_singleton_task',
  name: 'my_worker_name',
  params: {my_param: :param},
  unit: 'my_worker',
)

See {Ntswf::Base#configure} for configuration options.

Decision worker

config = {domain: 'my_domain', unit: 'my_app'} # ...
Ntswf.create(:decision_worker, config).process_decisions

Activity worker

config = {domain: 'my_domain', unit: 'my_worker'} # ...
worker = Ntswf.create(:activity_worker, config)
worker.on_activity ->(task) { {outcome: task.params['my_param']} }
worker.process_activities

Setup helpers

See {Ntswf::Utils}

License

LGPL-3.0