Code Monkey home page Code Monkey logo

Comments (5)

alachaum avatar alachaum commented on August 27, 2024 1

I'll still commit a small patch to avoid these errors on v0.12. Having some guarding against nil on the local server won't hurt.

Thanks for reporting this!

from cloudtasker.

alachaum avatar alachaum commented on August 27, 2024

Hi @feute,

It's weird, it's as if the local server queue was filled with an empty task. Would you be able to try using v0.12.rc9 instead and let me know if the result is the same on your side?

Also, side question, do you have any logic in your application regularly clearing the cache? Or any other application running in parallel tampering with the cache?

If so, you may point Cloudtasker to a different redis database using the config.redis = { url: 'redis://localhost:6379/5' } configuration option.

from cloudtasker.

feute avatar feute commented on August 27, 2024

I only use redis for ActionCable. I tried adding the config line for redis to use the /5 database but it didn't do anything, I guess it's because the default is /0 while ActionCable is configured to use /1, so it doesn't interfere.

I installed v0.12.rc9 and it seemed to work better. Sometimes I get the error with the DummyWorker: I fire up the console and call perform_async on the class and I get the error most of the time, but after retrying once or twice it starts to work. I kept the config.redis line just in case.

Is it safe to use v0.12.rc9 on production? I only mean to use it as a backend for ActiveJob (at least for now).

Edit: I get the error with the job as well, but only sometimes, and it works again if I call the perform_later function again. Would it be possible that the task is being added to redis after it is being pop'd by cloudtasker? I don't know if cloudtasker ensures that the data is present on redis before calling pop, but I'd think it's something like that because it works most of the time.

from cloudtasker.

alachaum avatar alachaum commented on August 27, 2024

v0.12.rc9 is safe to use in production (we currently use this version at Keypup and have processed millions of jobs already).

Now for the purpose of prod you can actually use v0.11.0 as well. The issue you're facing is only related to the cloudtasker local server, which is only to be used in development. In prod it's Google Cloud Tasks that will send the tasks to your application so the issue will not arise.

Just out of curiosity, do you have only one cloudtasker process running in dev? Or do you have several applications running it? Or do you use foreman process scaling options? (foreman start web=2 worker=3 etc.)

from cloudtasker.

feute avatar feute commented on August 27, 2024

That's what I thought, that it could be affecting the local server only. I think I'm going to use v0.12.rc9 because it works better for me.

I do have only one cloudtasker process running. I start it with foreman start, with no extra configuration.

Anyway, if I find out the cause of this particular error (something that is on my end) I'll update this issue. For now, I'll use the 0.12.rc9 version.

Thank you!

from cloudtasker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.