chaps-io / gush

Fast and distributed workflow runner using ActiveJob and Redis
MIT License
1.04k stars 104 forks source link

cannot create workflow instance #92

Closed shuheix closed 2 years ago

shuheix commented 2 years ago

Hi, I try to create workflow instance at rails console, but i cant

its never ends image

gush 2.0.1

# app/workflows/sample_workflow.rb
class SampleWorkflow < Gush::Workflow
  def configure
    run SleepJob
  end
end
# app/jobs/sleep_job.rb
class SleepJob < Gush::Job
  def perform
    logger.debug("start")
    sleep(30)
    logger.debug("end")
  end
end
# Gushfile
require_relative './config/environment.rb'
# application.rb
config.autoload_paths += %W[#{config.root}/lib #{Rails.root}/app/workflows #{Rails.root}/app/jobs]

sorry, what should I check?

pokonski commented 2 years ago

Creating workflows requires working Redis connection, it seems it is not properly working for you. Check if Redis is running and you can connect to it from your app, first.

shuheix commented 2 years ago

thanks you for your answer I try to check redis connection