asynr 1.0.1 → 1.3.0

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: af65e3652194e677bf1e61997ad7e279a90f43922c0d0c55df91a104975fa94f
4
- data.tar.gz: 890b147fb197d9d5926b2cf6f88afd1d9f3f50df672e27c06723069de9b19b10
3
+ metadata.gz: be2122555ff23eaa2ab0c58a772e456a6a2348dd4918247be899032fd005e45c
4
+ data.tar.gz: bccd692489a429f25b11146b05af9bf83069bc7030190784e4d6689f7952e08d
5
5
  SHA512:
6
- metadata.gz: fb32e46c307a524d5376ce25a26458bde2c448952dee08efe94498116e3b32ea2c03d3572e7fb6ed125a3916938f77a16845a965f280d55adb1de6c1f8420b99
7
- data.tar.gz: 40262c7d19e54bdaf196894c591d401585ccf0441bf014176886097ce7dadaaf29ae16cb0a8d8d452aee1a61295cd10ce87734728b603760b56211c5a18e4e1a
6
+ metadata.gz: 736797b5859756d0de5538d45760b146acad553c39a25c2d868b04cf1ad6710cf5c9925ac7eb9e50bd825466c30bff6114b6295009407d9772806bd1ddc0930b
7
+ data.tar.gz: 424c018cb3b2eeca345ba621049ce90d412565849b4f769193587ae94dc9eb0b8f14806cf22fba666e05f1f3f6b1fcb8a78736a1c872e8adcf3ca7e7816b4d35
data/.gitignore CHANGED
@@ -7,5 +7,6 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  /.vendor/
10
+ /.Gemfile.lock
10
11
  # rspec failure tracking
11
12
  .rspec_status
@@ -1,20 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- asynr (1.0.1)
5
- rufus-scheduler (~> 3.6.0)
4
+ asynr (1.3.0)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
9
8
  specs:
10
- concurrent-ruby (1.1.5)
11
9
  diff-lcs (1.3)
12
- et-orbi (1.2.2)
13
- tzinfo
14
- fugit (1.3.3)
15
- et-orbi (~> 1.1, >= 1.1.8)
16
- raabro (~> 1.1)
17
- raabro (1.1.6)
18
10
  rake (10.5.0)
19
11
  rspec (3.8.0)
20
12
  rspec-core (~> 3.8.0)
@@ -29,10 +21,6 @@ GEM
29
21
  diff-lcs (>= 1.2.0, < 2.0)
30
22
  rspec-support (~> 3.8.0)
31
23
  rspec-support (3.8.2)
32
- rufus-scheduler (3.6.0)
33
- fugit (~> 1.1, >= 1.1.6)
34
- tzinfo (2.0.0)
35
- concurrent-ruby (~> 1.0)
36
24
 
37
25
  PLATFORMS
38
26
  ruby
@@ -42,7 +30,6 @@ DEPENDENCIES
42
30
  bundler (~> 2.0)
43
31
  rake (~> 10.0)
44
32
  rspec (~> 3.0)
45
- rufus-scheduler
46
33
 
47
34
  BUNDLED WITH
48
35
  2.0.2
data/README.md CHANGED
@@ -1,115 +1,108 @@
1
1
  # Asynr
2
2
 
3
- A Ruby async scheduler based-upon Rufus::Scheduler gem.
4
-
5
- # How to install
6
-
7
- ```bash
8
- $ gem install asynr
9
- $ echo "gem 'asynr'" >> Gemfile
10
- $ bundle install
11
- ```
12
-
13
- # How to use
14
-
15
- ## Minimal setup
3
+ (This gem is a rebuild of a previous one located at the same Github repository).
4
+ \
5
+ Asynr is a gem to perform asynchronous tasks by evaluating directly classes and entrypoints.
6
+ This is highly inspired by Rufus-Scheduler.
16
7
 
17
- Asynr needs to know which class to be evaluated and scheduled. Require any class file before launching it.
8
+ ## How it works ?
18
9
 
10
+ When you want to create a scheduler running several tasks separated by classes, you can instantiate Asynr and launch them asynchronously an easy way.
11
+ \
12
+ Asynr is based-upon Ruby threads and requires no dependency.
19
13
  ```ruby
14
+ # example
20
15
  require "asynr"
21
- require_relative "./random_lib_with_class"
22
- ...
16
+ Dir.glob(Dir.pwd + "/lib/*_class.rb").each &method(:require)
17
+
18
+ class Worker
19
+ def self._start
20
+ scheduler = Asynr.new
21
+ scheduler.in 3, ARandomClass
22
+ scheduler.every 3600, 2, AnotherClass, {entrypoint: :new}
23
+ scheduler.at (Time.now + 10), AgainAnother, {arg1: :hello, arg2: :world}
24
+
25
+ scheduler.start
26
+ end
27
+ end
23
28
  ```
24
29
 
25
- ## Add a new job
26
-
27
- Jobs are minimal, since all Rufus methods aren't intented to be implemented. Here are the four parameters currently supported by Asynr.
28
-
29
- * name: each job has a name which can be used to remove the concerned job.
30
- * action: is the evaluated class name. Async will search for a run method inside of this class.
31
- * first_in: directly taken from Rufus, time before the action starts.
32
- * every: time between two class executions.
30
+ * We require asynr and all the files containing independant classes.
31
+ * We instantiate a new scheduler, which is gonna be empty
32
+ * We create .in, .every and .at jobs (read definitions)
33
+ * We start it
33
34
 
34
- ## Remove a job
35
+ ## launch a job in two days
35
36
 
36
- Jobs can be removed dynamically with their name:
37
+ ```ruby
38
+ secrets = File.read '/a/secret/path/secrets.txt'
37
39
 
38
- ```ruby
39
- ...
40
- inst.job(name: :Test, action: :RandomTest, every: 10, first_in: 0)
41
- inst.queue.length # 1
42
- inst.remove :Test
43
- inst.queue.length # 0
44
- ...
40
+ scheduler = Asynr.new
41
+ scheduler.at (Time.now + (3600 * 24) * 2), BackupFiles, {password: secrets}
42
+ scheduler.start
45
43
  ```
46
44
 
47
- ## Start all jobs
45
+ In this example, we are using the arguments API of Asynr. It allows us to bind any value to any key when calling a .in, .every or .at method.
48
46
 
49
- Once launched, a new job cannot be defined and added. We need to set all the jobs and related timers before starting the scheduler.
50
47
 
48
+ ## launch a job every hour
51
49
  ```ruby
52
- require "asynr"
50
+ url = "https://acoolwebsitetoscrap.com"
53
51
 
54
- inst = Asynr.new
55
- inst.job(name: :Test, action: RandomTest, every: 10, first_in: 0)
56
- inst.job(name: :Again, action: AnotherTest, every: 3, first_in: 1)
57
- inst.queue.length # 2
58
-
59
- inst.start!
52
+ scheduler = Asynr.new
53
+ scheduler.every 3600, 0, WebScrapper, {entrypoint: :new, url: url, save_to: "/tmp/scrapper"}
54
+ scheduler.start
60
55
  ```
61
56
 
62
- # Working example
63
-
64
- Since the logic behind it may confuse you regarding the class evaluation, here's a working example of how to use Asynr. Minimal yet functionnal.
57
+ We typically want to download a whole page every hour since it may change soon. This snippet allows you to send the url and the path where you want to save scrapped file.
65
58
  \
66
- This example will save a HTTP request launched every 60 seconds, for ever (until it is stopped).
67
59
 
60
+ ### Entrypoint argument
61
+ Entrypoint is a quite special argument, since it allows you to select which class method is gonna be called by the class evaluator. `new` allows you to create objects, and the default value is `self._entrypoint`.
62
+
63
+ Here is what a default Asynr-compliante class may look like.
68
64
  ```ruby
69
- require "asynr"
70
- require "typhoeus"
71
-
72
- class JSONFetcher
73
- def self.run
74
- res = Typhoeus::Request.get("https://httpbin.org/get")
75
- f = File.open "./http_bin_get.log", "a+"
76
- f.puts res.body
77
- end
65
+ class WebScrapper
66
+ def self._entrypoint(*args)
67
+ body = AnyHTTPLib.get(URI.parse(args[:url])).body
68
+ f = File.open("%s/%s" % [args[:save_to], Time.now.strftime('%y-%m-%d')])
69
+ f.puts body
70
+ f.close
71
+ end
78
72
  end
73
+ ```
79
74
 
80
- inst = Asynr.new
81
- inst.job(name: :JSONFetcher, action: JSONFetcher, first_in: 1, every: 60)
82
- inst.start!
75
+ ## Launch a job in two minutes
76
+ ```ruby
77
+ scheduler = Asynr.new
78
+ scheduler.in 120, PrintHelloWorld
83
79
  ```
84
80
 
85
- ## Optional architecture
81
+ This is a quite easy method to understand. Please mind you are free to put arguments at the end of this line or select another entrypoint than `_entrypoint`.
86
82
 
87
- With the previous example, we saw how Asynr works, but its initial goal is to allow us to create easy-to-develop softwares with integrated scheduler, such as API aggregator, or middlewares.
83
+ # Why an entrypoint ?
84
+ Ruby doesn't have any entrypoint function as main() could be one in Go, for example. This function is typically intended to provide a "entrypoint" where function-calls tree will be created and attached to. Since Ruby doesn't have it, without a entrypoint method, Asynr wouldn't be able to load and execute the class in a cool way.
88
85
  \
89
- Here's a software architecture that works.
86
+ I called this temporary main method `_entrypoint`. The `_` means it is special and it allows us to avoid common names mistakes. This method must be registred as `self` into a class to be called as it.
90
87
 
91
- ```
92
- Gemfile
93
- scheduler.rb
94
- worker/
95
- - download_first_file.rb
96
- - download_second_file.rb
97
- - download_third_file.rb
98
- lib/
99
- - dependency.rb
88
+ ```ruby
89
+ class RandomTest ; def self._entrypoint(*args) ; end ; end
100
90
  ```
101
91
 
102
- Asynr can easily handle all these executions every 60 seconds, for example.
92
+ You can override this parameter (in order to create instance through .new method, for example) by adding a `{entrypoint: :any_method}` argument to .in, .every and .at methods.
93
+ \
94
+ Please note the `*args` method parameter. It allows us to bind any information comming from the scheduler to attach it into the entrypoint method.
103
95
  \
104
- Into scheduler.rb :
96
+ Working example :
105
97
  ```ruby
106
- require "asynr"
107
- Dir.glob(Dir.pwd + "/worker/*.rb").each &method(:require)
98
+ url = "https://rubygems.org"
108
99
 
109
- asynr = Asynr.new
110
- asynr.job(name: :firstFile, action: DownloadFirstFile, first_in: 0, every: 60)
111
- asynr.job(name: :secondFile, action: DownloadSecondFile, first_in: 0, every: 60)
112
- asynr.job(name: :thirFile, action: DownloadThirdFile, first_in: 0, every: 60)
100
+ scheduler = Asynr.new
101
+ scheduler.in 3, DisplaySomething, {text: url}
113
102
 
114
- asynr.start!
103
+ class DisplaySomething
104
+ def self._entrypoint(*args)
105
+ puts args[:text]
106
+ end
107
+ end
115
108
  ```
@@ -5,19 +5,19 @@ require "asynr/version"
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "asynr"
7
7
  spec.version = Asynr::VERSION
8
- spec.authors = ["Atille"]
9
- spec.email = ["gfrancoisfrancois@outlook.com"]
8
+ spec.authors = ["Gautier François"]
9
+ spec.email = ["gfrancois@online.net"]
10
10
 
11
- spec.summary = %q{Async job planner based upon Rufus scheduler}
12
- spec.description = %q{Async job planner based upon Rufus scheduler Ruby gem and threads, with history and states.}
13
- spec.homepage = "https://rubygems.org/gems/asynr"
11
+ spec.summary = %q{Asynchronous scheduler based upon threads.}
12
+ spec.description = %q{Asynr evaluates asynchrounsly Ruby classes by calling entrypoint methods. It intends to be useful to schedule job tasks an easier way than currently.}
13
+ spec.homepage = "https://github.com/atilleh/asynr"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
17
17
 
18
18
  spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = "https://github.com/atilleh/async"
20
- spec.metadata["changelog_uri"] = "https://github.com/atilleh/async"
19
+ spec.metadata["source_code_uri"] = "https://github.com/atilleh/asynr"
20
+ spec.metadata["changelog_uri"] = "https://github.com/atilleh/asynr/tree/master/CHANGELOG.md"
21
21
 
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -31,7 +31,4 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "bundler", "~> 2.0"
32
32
  spec.add_development_dependency "rake", "~> 10.0"
33
33
  spec.add_development_dependency "rspec", "~> 3.0"
34
- spec.add_development_dependency "rufus-scheduler"
35
-
36
- spec.add_runtime_dependency 'rufus-scheduler', '~> 3.6.0'
37
34
  end
@@ -1,17 +1,15 @@
1
1
  require "asynr/version"
2
2
  require "asynr/core"
3
3
  require "asynr/job"
4
+ require "asynr/scheduler"
4
5
 
5
6
  module Asynr
6
7
 
7
- # Shortcut returning Core object
8
- # Will be called with Asynr.new instead of
9
- # Asynr::Core.new
10
- #
11
- # @param params [Hash] defaults options
12
- # @return self [Object] self from Asynr::Core
8
+ # Create a new scheduler
9
+ # @param params [Hash] default option to create a scheduler.
10
+ # @return self [Object] scheduler object from #Core
13
11
  def self.new(params={})
14
- Asynr::Core.new(params)
12
+ Core.new(params)
15
13
  end
16
14
 
17
15
  class Error < StandardError; end
@@ -1,52 +1,68 @@
1
- require "rufus-scheduler"
2
-
3
1
  module Asynr
4
- # Main gem class
2
+ # Core class exposes user-related methods
3
+ # to configure the scheduler jobs.
5
4
  class Core
6
- # Creates a new Rufus Scheduler and waits to
7
- # populate the local queue.
8
- # This local queue is gonna be converted into a
9
- # rufus queue.
10
- def initialize(params={})
5
+ def initialize(params)
11
6
  @params = params
12
- @local_queue = []
13
- @queue = Rufus::Scheduler.new
7
+ @scheduler = {
8
+ jobs: []
9
+ }
10
+ end
11
+
12
+ # Create a new :in job
13
+ # @param seconds [Int32] seconds to wait before running the job
14
+ # @param action_class [Object] class to evaluate
15
+ # @param arguments [Hash] optional arguments to pass to the job creator.
16
+ def in(seconds, action_class, *arguments)
17
+ @scheduler[:jobs].append(Job.new(
18
+ type: :in,
19
+ params: { seconds: seconds },
20
+ action: action_class,
21
+ arguments: arguments ||= nil
22
+ ))
14
23
  end
15
24
 
16
- # @return .local_queue [Array] already registered but unlaunched jobs.
17
- def queue
18
- @local_queue
25
+ # Create a new :every job
26
+ # @param seconds [Int32] seconds to wait between two occurences
27
+ # @param delay [Int32] amount of seconds before running it the first time
28
+ # @param action_class [Object] class to instantiate and execute.
29
+ # @param arguments [Hash] optional argument to transmit to the entrypoint.
30
+ def every(seconds, delay, action_class, *arguments)
31
+ @scheduler[:jobs].append(Job.new(
32
+ type: :every,
33
+ params: { seconds: seconds, delay: delay},
34
+ action: action_class,
35
+ arguments: arguments ||= nil
36
+ ))
19
37
  end
20
38
 
21
- # Create a new job
22
- # @see Job.new
23
- # @return job [Object] newly created job object.
24
- def job(options={})
25
- job = Asynr::Job.new(options)
26
- @local_queue.append job
27
- job
39
+ # Create a new :at job
40
+ # @param date_to [Object] Time object cursor to run the job.
41
+ # @param action_class [Object] class to instantiate and execute.
42
+ # @param arguments [hash] optional arguments to transmit to the entrypoint.
43
+ def at(date_to, action_class, *arguments)
44
+ @scheduler[:jobs].append(Job.new(
45
+ type: :at,
46
+ params: { date: date_to },
47
+ action: action_class,
48
+ arguments: arguments ||= nil
49
+ ))
28
50
  end
29
51
 
30
- # Removes a job from the local queue.
31
- # Useless if the queue has already been converted by .dispatch!
32
- # @see dispatch!
33
- def remove(name)
34
- @local_queue.delete_if {|i| i.name == name}
52
+ # Starts the scheduler.
53
+ def start
54
+ Scheduler.new(@scheduler)
35
55
  end
36
56
 
37
- # Converts the local_queue to rufus queue
38
- # execute it.
39
- def start!
40
- dispatch!
41
- @queue.join
57
+ # @return @scheduler [Hash] current scheduler instance
58
+ def config
59
+ @scheduler
42
60
  end
43
61
 
44
- # dispatch! converts local queue to rufus every object queue.
45
- protected
46
- def dispatch!
47
- @local_queue.each do |job|
48
- @queue.every job.every, first_in: job.first_in do job.action.send(:run) ; end
49
- end
50
- end
62
+ # @return @scheduler [Hash] current job queue
63
+ def jobs
64
+ @scheduler[:jobs]
65
+ end
51
66
  end
52
- end
67
+ end
68
+
@@ -1,31 +1,59 @@
1
1
  module Asynr
2
-
3
- # Class for job initialization
4
2
  class Job
5
- # Creates a new job instance, returned to Core library.
6
- # @param options [Hash] job options before start! call
7
- # @return nil
8
- def initialize(options={first_in: 60, every: 60})
9
- @options = options
10
- end
11
-
12
- # Setter/Getter of name option.
13
- def name ; @options[:name] ; end
14
- # @param name [Symbol] job short name
15
- def name=(name) ; @options[:name] = name ; end
16
-
17
- def action ; @options[:action] ; end
18
- # @param action [Class] class instance to evaluate
19
- def action=(action) ; @options[:action] = action ; end
20
-
21
- # Time to wait before running a job twice
22
- def every ; @options[:every] ; end
23
- # @param every [Int] amount of seconds
24
- def every=(every) ; @options[:every] = every ; end
25
-
26
- # Time to wait before starting the first job occurence
27
- def first_in ; @options[:first_in] ; end
28
- # @param first_in [Int] amount of seconds
29
- def first_in=(first_in) ; @options[:first_in] = first_in ; end
3
+ def initialize(job_descriptor)
4
+ @job = job_descriptor
5
+ @job[:metas] = {
6
+ created_at: Time.now,
7
+ created_at_timestamp: Time.now.to_i,
8
+ updated_at: Time.now,
9
+ status: :awaiting
10
+ }
11
+
12
+ if job_descriptor[:arguments][0].key? :entrypoint
13
+ @job[:entrypoint] = job_descriptor[:arguments][0][:entrypoint]
14
+ else
15
+ @job[:entrypoint] = :_entrypoint
16
+ end
17
+ end
18
+
19
+ def type
20
+ @job[:type]
21
+ end
22
+
23
+ def params
24
+ @job[:params]
25
+ end
26
+
27
+ def arguments
28
+ @job[:arguments]
29
+ end
30
+
31
+ def action
32
+ @job[:action]
33
+ end
34
+
35
+ def metas
36
+ @job[:metas]
37
+ end
38
+
39
+ def update
40
+ @job[:metas][:updated_at] = Time.now
41
+ end
42
+
43
+ def declare_running
44
+ @job[:metas][:status] = :running
45
+ end
46
+
47
+ def declare_finished
48
+ @job[:metas][:status] = :finished
49
+ end
50
+
51
+ def declare_scheduled
52
+ @job[:metas][:status] = :scheduled
53
+ end
54
+
55
+ def entrypoint
56
+ @job[:entrypoint]
57
+ end
30
58
  end
31
59
  end
@@ -0,0 +1,100 @@
1
+ module Asynr
2
+ # Scheduler class creates new threads for any job
3
+ # added to scheduler.
4
+ # @see Core#start
5
+ class Scheduler
6
+ # Creates an empty array of threads
7
+ # For each job, determines its type and create a thread based
8
+ # on it.
9
+ # Finally, executes the threads.
10
+ def initialize(scheduler)
11
+ @threads = []
12
+ scheduler[:jobs].each do |job|
13
+ @threads.append(_in(job)) if job.type == :in
14
+ @threads.append(_every(job)) if job.type == :every
15
+ @threads.append(_at(job)) if job.type == :at
16
+ end
17
+
18
+ @threads.each do |thr|
19
+ p thr.inspect
20
+ thr.join
21
+ end
22
+ end
23
+
24
+ protected
25
+ # Creates a new :in job.
26
+ # @param job [Object] job instance
27
+ # @return thx [Thread] thread transition
28
+ def _in(job)
29
+ thx = Thread.new do
30
+ job.declare_running
31
+ sleep job.params[:seconds]
32
+ job.action.send(job.entrypoint, job.arguments[0])
33
+ job.update
34
+ job.declare_finished
35
+ end
36
+
37
+ thx
38
+ end
39
+
40
+ # Creates a new :every job
41
+ # Will sleep if a delay has been set.
42
+ # Will be executed only once if kill parameter submitted.
43
+ # @param job [Object] job instance
44
+ # @return thx [Thread] thread transition
45
+ def _every(job)
46
+ thx = Thread.new do |thx|
47
+ job.declare_running
48
+ sleep job.params[:delay] ||= 0
49
+ x = true
50
+
51
+ while x == true
52
+ job.action.send(job.entrypoint, job.arguments[0])
53
+ job.update
54
+
55
+ if job.arguments[0][:kill]
56
+ puts "Job will sleep."
57
+ x = false
58
+ end
59
+
60
+ sleep job.params[:seconds]
61
+ end
62
+ end
63
+
64
+ thx
65
+ end
66
+
67
+ # Creates a new :at job
68
+ # Will be killed if kill argument specified.
69
+ # By default, execute the same job every day.
70
+ # @param job [Object] job object
71
+ # @return thx [Thread] thread transition
72
+ def _at(job)
73
+ thx = Thread.new do |thx|
74
+ job.declare_scheduled
75
+
76
+ x = false
77
+
78
+ while x == false
79
+ if Time.now.to_i == job.params[:date].to_i
80
+ job.declare_running
81
+ job.action.send(job.entrypoint, job.arguments[0])
82
+ job.update
83
+ job.declare_finished
84
+
85
+ if job.arguments[0][:kill]
86
+ x = true
87
+ end
88
+
89
+ job.params[:date] = Time.now + 86400
90
+ else
91
+ sleep 1
92
+ end
93
+ end
94
+ end
95
+
96
+ thx
97
+ end
98
+
99
+ end
100
+ end
@@ -1,3 +1,3 @@
1
1
  module Asynr
2
- VERSION = "1.0.1"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asynr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
- - Atille
7
+ - Gautier François
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-30 00:00:00.000000000 Z
11
+ date: 2019-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,38 +52,10 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rufus-scheduler
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rufus-scheduler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 3.6.0
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 3.6.0
83
- description: Async job planner based upon Rufus scheduler Ruby gem and threads, with
84
- history and states.
55
+ description: Asynr evaluates asynchrounsly Ruby classes by calling entrypoint methods.
56
+ It intends to be useful to schedule job tasks an easier way than currently.
85
57
  email:
86
- - gfrancoisfrancois@outlook.com
58
+ - gfrancois@online.net
87
59
  executables: []
88
60
  extensions: []
89
61
  extra_rdoc_files: []
@@ -103,15 +75,16 @@ files:
103
75
  - lib/asynr.rb
104
76
  - lib/asynr/core.rb
105
77
  - lib/asynr/job.rb
78
+ - lib/asynr/scheduler.rb
106
79
  - lib/asynr/version.rb
107
- homepage: https://rubygems.org/gems/asynr
80
+ homepage: https://github.com/atilleh/asynr
108
81
  licenses:
109
82
  - MIT
110
83
  metadata:
111
84
  allowed_push_host: https://rubygems.org
112
- homepage_uri: https://rubygems.org/gems/asynr
113
- source_code_uri: https://github.com/atilleh/async
114
- changelog_uri: https://github.com/atilleh/async
85
+ homepage_uri: https://github.com/atilleh/asynr
86
+ source_code_uri: https://github.com/atilleh/asynr
87
+ changelog_uri: https://github.com/atilleh/asynr/tree/master/CHANGELOG.md
115
88
  post_install_message:
116
89
  rdoc_options: []
117
90
  require_paths:
@@ -131,5 +104,5 @@ rubyforge_project:
131
104
  rubygems_version: 2.7.6.2
132
105
  signing_key:
133
106
  specification_version: 4
134
- summary: Async job planner based upon Rufus scheduler
107
+ summary: Asynchronous scheduler based upon threads.
135
108
  test_files: []