Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with reenqueing of a recurring task #8

Open
eilers opened this issue Aug 21, 2020 · 2 comments
Open

Problem with reenqueing of a recurring task #8

eilers opened this issue Aug 21, 2020 · 2 comments

Comments

@eilers
Copy link

eilers commented Aug 21, 2020

I have a real strange problem with the following Job:

class CheckUnmanagedDocumentJob < ApplicationJob
    repeat 'every day at 15:23pm'

    def perform
        RechnMgmUserArea::Organisation.all.each do |org|
            org.notify_waiting_documents
        end
    end
end

After executing with ./bin/rails activejob:schedule I see that the job is executed properly but is crashing with the following error:

undefined method `enqueue' for #<Enumerator:0x00007f9c502b3308>\n/Users/stefan/.rvm/gems/ruby-2.5.1/gems/activejob-scheduler-1.0.0.pre/lib/active_job/scheduler/job.rb:70

Do you have any idea what might be wrong? Thanks in advance!

My lock file:

PATH
  remote: ../rechn_mgm_user_area
  specs:
    rechn_mgm_user_area (0.1.29)
      activejob-scheduler (~> 1.0.0.pre)
      activesupport-decorators (~> 2.0)
      bootstrap-generators (~> 3.3, >= 3.3.4)
      bootstrap3-datetimepicker-rails (~> 4.17.43)
      bootswatch-sass (>= 3.3.7)
      jbuilder (~> 2.0)
      jquery-datatables-rails (~> 3.4.0)
      momentjs-rails (~> 2.15.1)
      nobrainer (~> 0.33.0)
      rails (>= 4.2.6)
      rethinkdb (~> 2.2, >= 2.2.0)
      spreadsheet (~> 1.1, >= 1.1.4)

GEM
  remote: http://gemserver.imhosting.de:3000/
  specs:
    actioncable (5.2.3)
      actionpack (= 5.2.3)
      nio4r (~> 2.0)
      websocket-driver (>= 0.6.1)
    actionmailer (5.2.3)
      actionpack (= 5.2.3)
      actionview (= 5.2.3)
      activejob (= 5.2.3)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.2.3)
      actionview (= 5.2.3)
      activesupport (= 5.2.3)
      rack (~> 2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.2.3)
      activesupport (= 5.2.3)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.2.3)
      activesupport (= 5.2.3)
      globalid (>= 0.3.6)
    activejob-scheduler (1.0.0.pre)
      actionmailer (> 5, < 7)
      activejob (> 5, < 7)
      activesupport (> 5, < 7)
      fugit (~> 1.3)
      travis-release (~> 0)
    activemodel (5.2.3)
      activesupport (= 5.2.3)
    activerecord (5.2.3)
      activemodel (= 5.2.3)
      activesupport (= 5.2.3)
      arel (>= 9.0)
    activestorage (5.2.3)
      actionpack (= 5.2.3)
      activerecord (= 5.2.3)
      marcel (~> 0.3.1)
    activesupport (5.2.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    activesupport-decorators (2.1.1)
      railties (>= 3.2.8)
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    arel (9.0.0)
    ast (2.4.0)
    awesome_print (1.8.0)
    aws-eventstream (1.1.0)
    aws-sdk (2.11.555)
      aws-sdk-resources (= 2.11.555)
    aws-sdk-core (2.11.555)
      aws-sigv4 (~> 1.0)
      jmespath (~> 1.0)
    aws-sdk-resources (2.11.555)
      aws-sdk-core (= 2.11.555)
    aws-sigv4 (1.2.1)
      aws-eventstream (~> 1, >= 1.0.2)
    backport (1.1.2)
    bcrypt (3.1.15)
    benchmark (0.1.0)
    bindex (0.8.1)
    binect_importer (0.0.41)
      activesupport-decorators (~> 2.0)
      dropbox-sdk (~> 1.6, >= 1.6.5)
      dropbox_api (~> 0.1.17)
      google-api-client (~> 0.37.0)
      jbuilder (~> 2.0)
      nobrainer (~> 0.33.0)
      rails (>= 4.2.6)
      rethinkdb (~> 2.2, >= 2.2.0)
    bootstrap-generators (3.3.4)
      railties (>= 3.1.0)
    bootstrap3-datetimepicker-rails (4.17.47)
      momentjs-rails (>= 2.8.1)
    bootswatch-sass (3.3.7)
      rails (>= 4.2.0)
      sass-rails (~> 5.0)
    builder (3.2.4)
    byebug (11.1.1)
    caxlsx (3.0.2)
      htmlentities (~> 4.3, >= 4.3.4)
      mimemagic (~> 0.3)
      nokogiri (~> 1.10, >= 1.10.4)
      rubyzip (>= 1.3.0, < 3)
    chronic (0.10.2)
    coffee-rails (5.0.0)
      coffee-script (>= 2.2.0)
      railties (>= 5.2.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    combine_pdf (1.0.16)
      ruby-rc4 (>= 0.1.5)
    concurrent-ruby (1.1.6)
    crass (1.0.6)
    daemons (1.3.1)
    daemons-rails (1.2.1)
      daemons
      multi_json (~> 1.0)
    declarative (0.0.20)
    declarative-option (0.1.0)
    delayed_job (4.1.8)
      activesupport (>= 3.0, < 6.1)
    delayed_job_nobrainer (0.1.5)
      delayed_job (>= 3.0, < 5)
      nobrainer (>= 0.32)
    devise (4.6.2)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0, < 6.0)
      responders
      warden (~> 1.2.3)
    devise-i18n (1.8.2)
      devise (>= 4.6)
    devise-jwt (0.8.0)
      devise (~> 4.0)
      warden-jwt_auth (~> 0.5)
    devise-nobrainer (0.5.0)
      devise (>= 3.2.2)
      nobrainer (>= 0.20.0)
    devise_authentication (0.1.2)
      activesupport-decorators (~> 2.0)
      devise (~> 4.6.0)
      devise-nobrainer (~> 0.5.0)
      devise_invitable (~> 2.0.0)
      nobrainer (~> 0.33.0)
      rails (>= 4.2.6)
    devise_invitable (2.0.2)
      actionmailer (>= 5.0)
      devise (>= 4.6)
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    dropbox-sdk (1.6.5)
      json
    dropbox_api (0.1.18)
      faraday (<= 1.0)
      oauth2 (~> 1.1)
    dropzonejs-rails (0.7.4)
      rails (> 3.1)
    dry-auto_inject (0.7.0)
      dry-container (>= 0.3.4)
    dry-configurable (0.9.0)
      concurrent-ruby (~> 1.0)
      dry-core (~> 0.4, >= 0.4.7)
    dry-container (0.7.2)
      concurrent-ruby (~> 1.0)
      dry-configurable (~> 0.1, >= 0.1.3)
    dry-core (0.4.9)
      concurrent-ruby (~> 1.0)
    e2mmap (0.1.0)
    erubi (1.9.0)
    et-orbi (1.2.4)
      tzinfo
    execjs (2.7.0)
    faraday (0.15.4)
      multipart-post (>= 1.2, < 3)
    faraday_middleware (0.13.1)
      faraday (>= 0.7.4, < 1.0)
    ffi (1.13.1)
    font-awesome-sass (5.13.0)
      sassc (>= 1.11)
    formvalidation-rails (0.8.1)
      jquery-rails (>= 3.0)
      railties (>= 3.0)
    fugit (1.3.8)
      et-orbi (~> 1.1, >= 1.1.8)
      raabro (~> 1.3)
    globalid (0.4.2)
      activesupport (>= 4.2.0)
    google-api-client (0.37.3)
      addressable (~> 2.5, >= 2.5.1)
      googleauth (~> 0.9)
      httpclient (>= 2.8.1, < 3.0)
      mini_mime (~> 1.0)
      representable (~> 3.0)
      retriable (>= 2.0, < 4.0)
      signet (~> 0.12)
    googleauth (0.10.0)
      faraday (~> 0.12)
      jwt (>= 1.4, < 3.0)
      memoist (~> 0.16)
      multi_json (~> 1.11)
      os (>= 0.9, < 2.0)
      signet (~> 0.12)
    htmlentities (4.3.4)
    http-cookie (1.0.3)
      domain_name (~> 0.5)
    httpclient (2.8.3)
    i18n (1.8.5)
      concurrent-ruby (~> 1.0)
    i18n-debug (1.2.0)
      i18n (< 2)
    jaro_winkler (1.5.4)
    jbuilder (2.10.0)
      activesupport (>= 5.0.0)
    jmespath (1.4.0)
    jquery-datatables-rails (3.4.0)
      actionpack (>= 3.1)
      jquery-rails
      railties (>= 3.1)
      sass-rails
    jquery-rails (4.4.0)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    json (2.3.1)
    jwt (2.2.1)
    loofah (2.6.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    mail (2.7.1)
      mini_mime (>= 0.1.1)
    marcel (0.3.3)
      mimemagic (~> 0.3.2)
    maruku (0.7.3)
    memoist (0.16.2)
    method_source (1.0.0)
    middleware (0.1.0)
    mime-types (2.99.3)
    mimemagic (0.3.5)
    mini_magick (4.10.1)
    mini_mime (1.0.2)
    mini_portile2 (2.4.0)
    minitest (5.14.1)
    momentjs-rails (2.15.1)
      railties (>= 3.1)
    multi_json (1.15.0)
    multi_xml (0.6.0)
    multipart-post (2.1.1)
    mustermann (1.1.1)
      ruby2_keywords (~> 0.0.1)
    netrc (0.11.0)
    nio4r (2.5.2)
    nobrainer (0.33.0)
      activemodel (>= 4.1.0)
      activesupport (>= 4.1.0)
      middleware (~> 0.1.0)
      rethinkdb (>= 2.3.0)
      symbol_decoration (~> 1.1)
    nokogiri (1.10.10)
      mini_portile2 (~> 2.4.0)
    nukleus (0.2.0)
      activesupport-decorators (~> 2.0)
      aws-sdk (~> 2.3)
      jbuilder (~> 2.0)
      nobrainer (~> 0.33.0)
      rails (>= 5.0.0)
      refile-mini_magick (~> 0.2.0)
      refile-nobrainer (~> 0.0.2)
      refile-s3 (~> 0.2.0)
      rethinkdb (~> 2.2, >= 2.2.0)
    oauth2 (1.4.4)
      faraday (>= 0.8, < 2.0)
      jwt (>= 1.0, < 3.0)
      multi_json (~> 1.3)
      multi_xml (~> 0.5)
      rack (>= 1.2, < 3)
    onesignal-ruby (0.3.0)
      activesupport (~> 5.0, >= 5.0.0)
      faraday (~> 0.15, >= 0.15.4)
      simple_command (~> 0, >= 0.0.9)
    orm_adapter (0.5.0)
    os (1.1.0)
    parallel (1.19.1)
    parser (2.7.0.4)
      ast (~> 2.4.0)
    passenger (6.0.2)
      rack
      rake (>= 0.8.1)
    public_suffix (4.0.5)
    puma (4.3.3)
      nio4r (~> 2.0)
    raabro (1.3.1)
    rack (2.2.3)
    rack-cors (1.1.1)
      rack (>= 2.0.0)
    rack-protection (2.0.8.1)
      rack
    rack-test (1.1.0)
      rack (>= 1.0, < 3)
    rails (5.2.3)
      actioncable (= 5.2.3)
      actionmailer (= 5.2.3)
      actionpack (= 5.2.3)
      actionview (= 5.2.3)
      activejob (= 5.2.3)
      activemodel (= 5.2.3)
      activerecord (= 5.2.3)
      activestorage (= 5.2.3)
      activesupport (= 5.2.3)
      bundler (>= 1.3.0)
      railties (= 5.2.3)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.3.0)
      loofah (~> 2.3)
    rails-i18n (5.1.3)
      i18n (>= 0.7, < 2)
      railties (>= 5.0, < 6)
    railties (5.2.3)
      actionpack (= 5.2.3)
      activesupport (= 5.2.3)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.19.0, < 2.0)
    rainbow (3.0.0)
    rake (13.0.1)
    rb-fsevent (0.10.4)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rdoc (6.2.1)
    rechn_mgm_web (0.2.4)
      activesupport-decorators (~> 2.0)
      bootstrap-generators (>= 3.3.4)
      bootswatch-sass (>= 3.3.7)
      caxlsx (~> 3.0, >= 3.0.2)
      devise-i18n (>= 1.1.1)
      devise-jwt
      devise_authentication (~> 0.1.0)
      dropzonejs-rails (~> 0.7.3)
      dry-configurable (~> 0.9.0)
      faraday (~> 0.15.0)
      faraday_middleware (~> 0.13.0)
      font-awesome-sass (>= 4.6.2)
      jquery-rails (~> 4.1, >= 4.1.1)
      nukleus (~> 0.2.0)
      onesignal-ruby (~> 0.3.0)
      rails (>= 4.2.6)
      rails-i18n (>= 4.0.9)
      redis (~> 4.1, >= 4.1.2)
      rmagick (= 4.1.2)
    redis (4.2.1)
    refile (0.6.2.pre.im)
      mime-types
      rest-client (~> 1.8)
      sinatra (>= 1.4.5)
    refile-mini_magick (0.2.0)
      mini_magick (~> 4.0)
      refile (~> 0.5)
    refile-nobrainer (0.0.2)
      nobrainer (~> 0.31)
      refile (~> 0.5)
    refile-s3 (0.2.0)
      aws-sdk (~> 2.0)
      refile (~> 0.6.0)
    representable (3.0.4)
      declarative (< 0.1.0)
      declarative-option (< 0.2.0)
      uber (< 0.2.0)
    responders (3.0.1)
      actionpack (>= 5.0)
      railties (>= 5.0)
    rest-client (1.8.0)
      http-cookie (>= 1.0.2, < 2.0)
      mime-types (>= 1.16, < 3.0)
      netrc (~> 0.7)
    rethinkdb (2.4.0.0)
    retriable (3.1.2)
    reverse_markdown (1.4.0)
      nokogiri
    rexml (3.2.4)
    rmagick (4.1.2)
    rubocop (0.80.1)
      jaro_winkler (~> 1.5.1)
      parallel (~> 1.10)
      parser (>= 2.7.0.1)
      rainbow (>= 2.2.2, < 4.0)
      rexml
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 1.4.0, < 1.7)
    ruby-ole (1.2.12.2)
    ruby-progressbar (1.10.1)
    ruby-rc4 (0.1.5)
    ruby2_keywords (0.0.2)
    rubyzip (2.3.0)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sass-rails (5.1.0)
      railties (>= 5.2.0)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sassc (2.4.0)
      ffi (~> 1.9)
    sdoc (1.1.0)
      rdoc (>= 5.0)
    signet (0.12.0)
      addressable (~> 2.3)
      faraday (~> 0.9)
      jwt (>= 1.5, < 3.0)
      multi_json (~> 1.10)
    simple_command (0.1.0)
    sinatra (2.0.8.1)
      mustermann (~> 1.0)
      rack (~> 2.0)
      rack-protection (= 2.0.8.1)
      tilt (~> 2.0)
    solargraph (0.38.5)
      backport (~> 1.1)
      benchmark
      bundler (>= 1.17.2)
      e2mmap
      jaro_winkler (~> 1.5)
      maruku (~> 0.7, >= 0.7.3)
      nokogiri (~> 1.9, >= 1.9.1)
      parser (~> 2.3)
      reverse_markdown (~> 1.0, >= 1.0.5)
      rubocop (~> 0.52)
      thor (~> 1.0)
      tilt (~> 2.0)
      yard (~> 0.9)
    spreadsheet (1.2.6)
      ruby-ole (>= 1.0)
    spring (2.1.0)
    sprockets (3.7.2)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.1)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    symbol_decoration (1.1.0)
    thor (1.0.1)
    thread_safe (0.3.6)
    tilt (2.0.10)
    travis-release (0.0.4)
      bundler
      rake
    tzinfo (1.2.7)
      thread_safe (~> 0.1)
    uber (0.1.0)
    uglifier (4.2.0)
      execjs (>= 0.3.0, < 3)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.7.7)
    unicode-display_width (1.6.1)
    warden (1.2.8)
      rack (>= 2.0.6)
    warden-jwt_auth (0.5.0)
      dry-auto_inject (~> 0.6)
      dry-configurable (~> 0.9)
      jwt (~> 2.1)
      warden (~> 1.2)
    web-console (3.7.0)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket-driver (0.7.3)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    whenever (1.0.0)
      chronic (>= 0.6.3)
    wicked_pdf (2.0.1)
      activesupport
    wkhtmltopdf-binary (0.12.5.4)
    yard (0.9.24)

PLATFORMS
  ruby

DEPENDENCIES
  awesome_print
  binect_importer
  byebug
  coffee-rails
  combine_pdf
  concurrent-ruby
  daemons-rails
  delayed_job_nobrainer
  devise-jwt
  devise_authentication (~> 0.1)
  dropzonejs-rails
  dry-configurable (~> 0.9.0)
  font-awesome-sass
  formvalidation-rails
  i18n-debug
  jbuilder
  jquery-rails
  nukleus
  passenger
  puma
  rack-cors
  rails (= 5.2.3)
  rechn_mgm_user_area!
  rechn_mgm_web (~> 0.2.0)
  sass-rails
  sdoc
  solargraph
  spring
  uglifier (>= 1.3.0)
  web-console
  whenever
  wicked_pdf (~> 2.0.0)
  wkhtmltopdf-binary

RUBY VERSION
   ruby 2.5.1p57

BUNDLED WITH
   2.0.2
@orangewolf
Copy link

we found that we had another job library that added an event method to your job classes. these two conflicted and were causing non-scheduled jobs to try to be scheduled

@orangewolf
Copy link

opened a #9 to resolve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants