Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

celluloid-supervision

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

celluloid-supervision

  • 0.20.6
  • Rubygems
  • Socket score

Version published
Maintainers
3
Created
Source

Celluloid Supervision

Gem Version Build Status Code Climate Coverage Status

Supervisors; with Supervision Containers (Groups), Configurations, and Trees for Celluloid.

To supervise actors, you have many options:

Using supervisors.

Directly

MyActor.supervise as: :my_actor # Without arguments.
MyActor.supervise as: :my_actor, args: [:one_arg, :two_args]

Indirectly

Celluloid.supervise as: :my_actor, type: MyActor # Without arguments.
Celluloid.supervise as: :my_actor, type: MyActor, args: [:one_arg, :two_args]

Using containers.

container = Celluloid::Supervision::Container.new {
  supervise type: MyActor, as: :my_actor
  supervise type: MyActor, as: :my_actor_with_args, args: [:one_arg, :two_args]
}
container.run!

Using configuration objects:

config = Celluloid::Supervision::Configuration.define([
  {
    type: MyActor,
    as: :my_actor
  },
  {
    type: MyActor,
    as: :my_actor_with_args,
    args: [
      :one_arg,
      :two_args
    ]
  },
])

# Whenever you would like to deploy the actors:
config.deploy

# Whenver you would like to shut them down:
config.shutdown

# Reuse the same configuration if you like!
config.deploy

By on-going configuration object:

config = Celluloid::Supervision::Configuration.new
config.define type: MyActor, as: :my_actor
config.define type: MyActor, as: :my_actor_with_args, args: [:one_arg, :two_args]
config deploy

# Now add actors to the already running configuration.
config.add type: MyActor, as: :my_actor_deployed_immediately
config.shutdown

Documentation coming:

  • Supervision Trees
  • Supervised Pools
  • Supervised Supervisors

Contributing

  • Fork this repository on github.
  • Make your changes and send us a pull request.
  • If we like them we'll merge them.
  • If we've accepted a patch, feel free to ask for commit access.

License

Copyright (c) 2011-2015 Tony Arcieri, Donovan Keme. Distributed under the MIT License. See LICENSE.txt for further details.

FAQs

Package last updated on 19 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc