rufus-scheduler 3.8.0 → 3.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86f0ae4ebefa9cf941f66efb56041515eea96cb5105289d9f0f54899841cffc6
4
- data.tar.gz: 9e6d1422b91536aa56cc2cdb627f3c88e21748c8e8734ba2eb929a46912f303e
3
+ metadata.gz: fec88a5f600474172a07002ec7a17c2b35cd9aeffff3e2cfe9865e49e0c9a6d7
4
+ data.tar.gz: ca607aef24a501fd1a23370e230c6481fe8624c6111c79b11f7f59fc5edc5884
5
5
  SHA512:
6
- metadata.gz: 45667cceb3f382ac71b7158d2884fbde21c9ac6f3027889a1dd8b7fd855bd014b35a1a4180b93118552aa7e6e08df061259113b1a5ce86f4e892a4b2f8c0436e
7
- data.tar.gz: 9ef9d0926f33bacdb0c2b8727b801d861db960ba4b6efac28642ea27e578c1de60a6b1b144217cace6c17de759100b0229c42ba79bb9db4b40527c1e8cdac8e4
6
+ metadata.gz: 0e2535642cb251105341e3d70998500f86370d41b13a6841698e15bc729d5d94ec420cfa4dc4549794ff53b82e442ae61962a61f10751a10c303f21a991d4cfc
7
+ data.tar.gz: bdfe0713a8b5bbec83403dbc1232f5bd310579707fd7b838a224367bc4cdd34752defc47f9cc1bb0686267c3a4b49114490866d6b8dcde22ce6ec3c52479ea90
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ### rufus-scheduler 3.8.1 - released 2022-01-11
6
+
7
+ * Suppress warning about @resume_discard_past
8
+ * Suppress warning about unused variable, solackerman gh-332
9
+
10
+
5
11
  ### rufus-scheduler 3.8.0 - released 2021-07-14
6
12
 
7
13
  * Add #source_location to Job, gh-322
data/CREDITS.md CHANGED
@@ -4,7 +4,8 @@
4
4
 
5
5
  ## Contributors
6
6
 
7
- * John Bachir https://github.com/jjb gh-310
7
+ * Sol Ackerman https://github.com/solarckerman gh-332
8
+ * John Bachir https://github.com/jjb gh-310 gh-327
8
9
  * Daniel Berger https://github.com/djberg96 gh-300
9
10
  * Ceyhun Onur https://github.com/ceyonur parse_cron no_error: true
10
11
  * Darwin Wu https://github.com/dwaxe Rails initializer vs tests change
data/LICENSE.txt CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- Copyright (c) 2005-2021, John Mettraux, jmettraux@gmail.com
2
+ Copyright (c) 2005-2022, John Mettraux, jmettraux@gmail.com
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1649,14 +1649,16 @@ If you don't want rufus-scheduler to trigger anything while running the Ruby on
1649
1649
 
1650
1650
  require 'rufus-scheduler'
1651
1651
 
1652
- s = Rufus::Scheduler.singleton
1652
+ return if defined?(Rails::Console) || Rails.env.test? || File.split($PROGRAM_NAME).last == 'rake'
1653
+ #
1654
+ # do not schedule when Rails is run from its console, for a test/spec, or
1655
+ # from a Rake task
1653
1656
 
1654
- return if defined?(Rails::Console) || Rails.env.test? || File.split($0).last == 'rake'
1655
1657
  # return if $PROGRAM_NAME.include?('spring')
1658
+ #
1656
1659
  # see https://github.com/jmettraux/rufus-scheduler/issues/186
1657
1660
 
1658
- # do not schedule when Rails is run from its console, for a test/spec, or
1659
- # from a Rake task
1661
+ s = Rufus::Scheduler.singleton
1660
1662
 
1661
1663
  s.every '1m' do
1662
1664
  Rails.logger.info "hello, it's #{Time.now}"
@@ -1664,6 +1666,8 @@ s.every '1m' do
1664
1666
  end
1665
1667
  ```
1666
1668
 
1669
+ (Beware later version of Rails where Spring takes care pre-running the initializers. Running `spring stop` or disabling Spring might be necessary in some cases to see changes to initializers being taken into account.)
1670
+
1667
1671
 
1668
1672
  ### rails server -d
1669
1673
 
@@ -1680,6 +1684,9 @@ These are two well crafted articles on process daemonization, please read them:
1680
1684
 
1681
1685
  If, anyway, you need something like `rails server -d`, why not try `bundle exec unicorn -D` instead? In my (limited) experience, it worked out of the box (well, had to add `gem 'unicorn'` to `Gemfile` first).
1682
1686
 
1687
+ ### executor / reloader
1688
+
1689
+ You might benefit from wraping your scheduled code in the executor or reloader. Read more here: https://guides.rubyonrails.org/threading_and_code_execution.html
1683
1690
 
1684
1691
  ## support
1685
1692
 
@@ -25,6 +25,8 @@ class Rufus::Scheduler::RepeatJob < Rufus::Scheduler::Job
25
25
  nil
26
26
  self.last_at =
27
27
  opts[:last] || opts[:last_at] || opts[:last_in]
28
+
29
+ @resume_discard_past = nil
28
30
  end
29
31
 
30
32
  FIRSTS = [ :now, :immediately, 0 ].freeze
@@ -9,7 +9,7 @@ module Rufus; end
9
9
 
10
10
  class Rufus::Scheduler
11
11
 
12
- VERSION = '3.8.0'
12
+ VERSION = '3.8.1'
13
13
 
14
14
  EoTime = ::EtOrbi::EoTime
15
15
 
@@ -583,7 +583,7 @@ class Rufus::Scheduler
583
583
  r =
584
584
  begin
585
585
  @join_queue.pop(true)
586
- rescue ThreadError => e
586
+ rescue ThreadError
587
587
  # #<ThreadError: queue empty>
588
588
  false
589
589
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-14 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fugit