Class: Wolverine::Configuration

Inherits:
Struct
  • Object
show all
Defined in:
lib/wolverine/configuration.rb

Instance Attribute Summary collapse

Instance Attribute Details

#instrumentation#call

Wolverine.config.instrumentation can be used to specify a callback to fire with the runtime of each script. This can be useful for analyzing scripts to make sure they aren’t running for an unreasonable amount of time.

The proc will receive three parameters:

  • script_name: A unique identifier for the script, based on its location in the file system

  • runtime: A float, the total execution time of the script

  • eval_type: Either eval or evalsha, the method used to run the script

Returns:

  • (#call)

    the proc or other callable to be triggered on completion of a script.



23
24
25
# File 'lib/wolverine/configuration.rb', line 23

def instrumentation
  @instrumentation
end

#redisRedis

Returns the redis connection actively in use by Wolverine.

Returns:

  • (Redis)

    the redis connection actively in use by Wolverine



5
6
7
# File 'lib/wolverine/configuration.rb', line 5

def redis
  @redis
end

#script_pathPathname

Returns the path wolverine will check for scripts.

Returns:

  • (Pathname)

    the path wolverine will check for scripts



28
29
30
# File 'lib/wolverine/configuration.rb', line 28

def script_path
  @script_path
end