foreverb 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGES.md CHANGED
@@ -1,4 +1,4 @@
1
- # Version 0.2.2
1
+ # Version 0.2.3
2
2
 
3
3
  * Added global monitoring, to easily watch each `foreverb` daemon
4
4
  * Look daemons through config file and unix command `ps`
data/bin/foreverb CHANGED
@@ -39,7 +39,6 @@ class CLI < Thor
39
39
  if options.yes || yes?("Do you want really stop \e[1m#{conf[:file]}\e[0m?")
40
40
  say_status "STOPPING", conf[:file]
41
41
  system(conf[:file], 'stop')
42
- say_status "ERROR", result, :red if result != ""
43
42
  end
44
43
  end
45
44
  end
data/examples/sample CHANGED
@@ -10,42 +10,42 @@ Forever.run do
10
10
  puts "All jobs will will wait me for 1 second"; sleep 1
11
11
  end
12
12
 
13
- # every 5.seconds, :last => Time.now do
14
- # puts "Every 5 seconds from start"
15
- # end
16
- #
17
- # every 30.seconds, :last => Time.now do
18
- # puts "Every 30 seconds from start with boom"
19
- # raise "woooooa"
20
- # end
21
- #
22
- # every 10.seconds, :at => "#{Time.now.hour}:00" do
23
- # puts "Every 10 seconds but first call at #{Time.now.hour}:00"
24
- # end
25
- #
26
- # every 1.seconds, :at => "#{Time.now.hour}:#{Time.now.min+1}" do
27
- # puts "Every one second but first call at #{Time.now.hour}:#{Time.now.min}"
28
- # end
29
- #
13
+ every 5.seconds, :last => Time.now do
14
+ puts "Every 5 seconds from start"
15
+ end
16
+
17
+ every 30.seconds, :last => Time.now do
18
+ puts "Every 30 seconds from start with boom"
19
+ raise "woooooa"
20
+ end
21
+
22
+ every 10.seconds, :at => "#{Time.now.hour}:00" do
23
+ puts "Every 10 seconds but first call at #{Time.now.hour}:00"
24
+ end
25
+
26
+ every 1.seconds, :at => "#{Time.now.hour}:#{Time.now.min+1}" do
27
+ puts "Every one second but first call at #{Time.now.hour}:#{Time.now.min}"
28
+ end
29
+
30
30
  every 10.seconds do
31
31
  puts "Every 10 second"
32
32
  end
33
- #
34
- # every 20.seconds do
35
- # puts "Every 20 second"
36
- # end
37
- #
38
- # every 15.seconds do
39
- # puts "Every 15 seconds, but my task require 10 seconds"; sleep 10
40
- # end
41
- #
42
- # every 10.seconds, :at => [":#{Time.now.min+1}", ":#{Time.now.min+2}"] do
43
- # puts "Every 10 seconds but first call at xx:#{Time.now.min}"
44
- # end
45
- #
46
- # on_error do |e|
47
- # puts "Boom raised: #{e.message}"
48
- # end
33
+
34
+ every 20.seconds do
35
+ puts "Every 20 second"
36
+ end
37
+
38
+ every 15.seconds do
39
+ puts "Every 15 seconds, but my task require 10 seconds"; sleep 10
40
+ end
41
+
42
+ every 10.seconds, :at => [":#{Time.now.min+1}", ":#{Time.now.min+2}"] do
43
+ puts "Every 10 seconds but first call at xx:#{Time.now.min}"
44
+ end
45
+
46
+ on_error do |e|
47
+ puts "Boom raised: #{e.message}"
48
+ end
49
49
 
50
50
  on_exit do
51
51
  puts "Bye bye"
@@ -1,3 +1,3 @@
1
1
  module Forever
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreverb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - DAddYE
@@ -51,7 +51,6 @@ files:
51
51
  - Rakefile
52
52
  - bin/foreverb
53
53
  - examples/sample
54
- - examples/tmp/sample.pid
55
54
  - foreverb.gemspec
56
55
  - lib/forever.rb
57
56
  - lib/forever/base.rb