Code Monkey home page Code Monkey logo

active_scheduler's Introduction

active_scheduler's People

Contributors

amhol avatar jdguzman avatar jeremycrosbie avatar justinaiken avatar r3trofitted avatar spiffystores avatar ximus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

active_scheduler's Issues

How to start scheduler?

How is active scheduler supposed to be started after being configured? I'm using Rails 5. is it through rails resque:scheduler ?

enqueue_at

hi,
when I use
Resque.enqueue_at(10.seconds.from_now, SendMailJob, :my_id => id)
my job is correctly added to delayed job, then it is added to default queue, then I can see in resque-web that it has been counted as a success but I dont receive any mail
If I do
SendMailJob.perform_later(:my_id => id)

then I receive a mail.

my job:

class SendMailJob < ActiveJob::Base
  queue_as :default
  
  def self.queue
    :default
  end

  def perform(params)
    user = User.find(params[:id])
    ...
  end
end

what am I doing wrong ?

Recurring jobs are failing after 1 day

We are running recurring jobs continuously for every 30s but it is working for one day on production after one if schedule the job its not working and not executing the job.

Please help me ASAP.

Add info to readme regarding class name length restriction

Thanks for the great gem.

One small issue I ran into. I had a class name that was 41 characters in length which resulted in an app[scheduler.1]: NameError: uninitialized constant on Heroku only (it seemed to work fine in development) when I added the active_scheduler gem.

When I renamed the class so it was now 29 characters in length I no longer received the error on Heroku.

Perhaps some info regarding class name size restrictions could be added to the readme if such a restriction does exist.

Thoughts on autoloading

I currently set my schedule within an initializer and using this gem causes my jobs to be autoloaded, which in Rails 6 is now deprecated. I'm doing this in an initializer to enable me to use the resque-scheduler web UI. The error I get is below. I was wondering if anyone had any good solutions to this.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload ApplicationJob, for example,
the expected changes won't be reflected in that stale Class object.

These autoloaded constants have been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.

named_args not working properly

my job class looks something like this:

class MyJob < ApplicationJob
 def perform(arg0 = false, arg1 = 1)
  puts "arg0=#{arg0} ~~~ arg1=#{arg1}"
 end
end

resque_schedule.yml looks like this:

MyJob:
  cron: "* * * * *"
  queue: "default"
  named_args: true
  args:
    - arg0: false
      arg1: 0

but the result is
arg0={arg0: false, arg1: 0} ~~~ arg1=1

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.