README.md in sidetiq-0.3.2 vs README.md in sidetiq-0.3.3
- old
+ new
@@ -69,11 +69,11 @@
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
# Daily at midnight
- tiq { daily }
+ recurrence { daily }
def perform
# do stuff ...
end
end
@@ -84,11 +84,11 @@
```ruby
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
- tiq do
+ recurrence do
# Every third year in March
yearly(3).month_of_year(:march)
# Every second year in February
yearly(2).month_of_year(:february)
@@ -106,11 +106,11 @@
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
# Every other month on the first monday and last tuesday at 12 o'clock.
- tiq { monthly(2).day_of_week(1 => [1], 2 => [-1]).hour_of_day(12) }
+ recurrence { monthly(2).day_of_week(1 => [1], 2 => [-1]).hour_of_day(12) }
def perform
# do stuff ...
end
end
@@ -123,11 +123,11 @@
```ruby
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
- tiq { daily }
+ recurrence { daily }
# Receive last and current occurrence times.
def perform(last_occurrence, current_occurrence)
# do stuff ...
end
@@ -150,21 +150,21 @@
Backfills
---------
In certain cases it is desirable that missed jobs will be enqueued
retroactively, for example when a critical, hourly job isn't run due to
-server downtime. To solve this, `#tiq` takes a *backfill* option. If
+server downtime. To solve this, `#recurrence` takes a *backfill* option. If
missing job occurrences have been detected, Sidetiq will then enqueue
the jobs automatically. It will also ensure that the timestamps passed to
`#perform` are as expected:
```ruby
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
- tiq backfill: true do
+ recurrence backfill: true do
hourly
end
def perform(last_occurrence, current_occurrence)
# do stuff ...
@@ -217,11 +217,12 @@
Sidetiq.schedules
# => { MyWorker => #<Sidetiq::Schedule> }
```
`Sidetiq.workers` returns an `Array` of all workers currently tracked by
-Sidetiq (workers which include `Sidetiq::Schedulable` and a `.tiq` call):
+Sidetiq (workers which include `Sidetiq::Schedulable` and a `.recurrence`
+call):
```ruby
Sidetiq.workers
# => [MyWorker, AnotherWorker]
```
@@ -283,21 +284,21 @@
```ruby
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
- tiq { minutely(15) }
+ recurrence { minutely(15) }
end
```
It is better to use the more explicit way:
```ruby
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
- tiq { hourly.minute_of_hour(0, 15, 30, 45) }
+ recurrence { hourly.minute_of_hour(0, 15, 30, 45) }
end
```
<a name='section_Web_Extension'></a>
Web Extension