Module: Conflow
- Defined in:
- lib/conflow.rb,
lib/conflow/job.rb,
lib/conflow/flow.rb,
lib/conflow/redis.rb,
lib/conflow/worker.rb,
lib/conflow/version.rb,
lib/conflow/redis/field.rb,
lib/conflow/redis/model.rb,
lib/conflow/redis/script.rb,
lib/conflow/redis/findable.rb,
lib/conflow/redis/set_field.rb,
lib/conflow/flow/job_handler.rb,
lib/conflow/redis/hash_field.rb,
lib/conflow/redis/identifier.rb,
lib/conflow/redis/array_field.rb,
lib/conflow/redis/value_field.rb,
lib/conflow/redis/field_builder.rb,
lib/conflow/redis/add_job_script.rb,
lib/conflow/redis/sorted_set_field.rb,
lib/conflow/redis/queue_jobs_script.rb,
lib/conflow/redis/connection_wrapper.rb,
lib/conflow/redis/complete_job_script.rb
Overview
Conflow allows defining comlicated workflows with dependencies. Inspired by Gush (the idea) and Redis::Objects (the implementation) it focuses solely on dependency logic, while leaving queueing jobs and executing them entirely in hands of the programmer.
Defined Under Namespace
Modules: Redis, Worker Classes: Flow, Job
Constant Summary collapse
- VERSION =
Current version of the gem
"0.3.0"
Class Method Summary collapse
-
.redis ⇒ Conflow::Redis::ConnectionWrapper, ConnectionPool
Wrapped Redis connection.
-
.redis=(conn) ⇒ Object
Assigns Redis connection to be used by Conflow.
Class Method Details
.redis ⇒ Conflow::Redis::ConnectionWrapper, ConnectionPool
Returns Wrapped Redis connection.
54 55 56 57 |
# File 'lib/conflow.rb', line 54 def redis self.redis = ::Redis.current unless defined?(@redis) @redis end |
.redis=(conn) ⇒ Object
Assigns Redis connection to be used by Conflow. It will be wrapped in ConnectionWrapper for Redis instances, in order to have single API containing #with method. You can also assign ConnectionPool instance.
44 45 46 47 48 49 50 51 |
# File 'lib/conflow.rb', line 44 def redis=(conn) @redis = if defined?(ConnectionPool) && conn.is_a?(ConnectionPool) conn else Conflow::Redis::ConnectionWrapper.new(conn) end end |