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 +4 -4
- data/CHANGELOG.md +6 -0
- data/CREDITS.md +2 -1
- data/LICENSE.txt +1 -1
- data/README.md +11 -4
- data/lib/rufus/scheduler/jobs_repeat.rb +2 -0
- data/lib/rufus/scheduler.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fec88a5f600474172a07002ec7a17c2b35cd9aeffff3e2cfe9865e49e0c9a6d7
|
4
|
+
data.tar.gz: ca607aef24a501fd1a23370e230c6481fe8624c6111c79b11f7f59fc5edc5884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
*
|
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-
|
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
|
-
|
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
|
-
|
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
|
|
data/lib/rufus/scheduler.rb
CHANGED
@@ -9,7 +9,7 @@ module Rufus; end
|
|
9
9
|
|
10
10
|
class Rufus::Scheduler
|
11
11
|
|
12
|
-
VERSION = '3.8.
|
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
|
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.
|
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:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fugit
|