Pergunta

It is instead taking up my processor, and then effectually timing out.

I have in my controller :

after_save :handle_file

def handle_test
  Resque.enqueue UnpackFileOnS3, parent.id
end

It hits this mark, and then the entire app waits for it to set up and upload the files as prescribed inside my Job. Then it predictably times out because it takes awhile to upload it.

This occurs in my console as well.. If I run :

Resque.enqueue UnpackFileOnS3, 4

Then instead of enqueue'ing it, it locks up my console as it tries to run the entire file. I think that normally, console would just enqueue it to a worker and redis..

Why isn't this actually happening in the background? As I assume if that were the case, the timeouts would not occur.

Foi útil?

Solução

My guess is that you are running resque in an inline mode. In this mode queing is disabled. Check your configs for this kind of code:

Resque.inline = ENV['RAILS_ENV'] == "cucumber"
#or whatever, important part is the inline option
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top