-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test passing the scheduled time and not passing the time into jobs an…
…d workers
- Loading branch information
1 parent
2c60cce
commit 958a355
Showing
15 changed files
with
124 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Example file used by scheduler_job_spec.rb as the default config path. | ||
job_one: | ||
class: "SimpleSchedulerTestJob" | ||
class: "TestJob" | ||
every: "1.week" | ||
at: "Sun 1:00" | ||
|
||
job_two: | ||
class: "SimpleSchedulerTestJob" | ||
class: "TestJob" | ||
every: "1.week" | ||
at: "Sun 1:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Active Job for testing | ||
class TestJob < ApplicationJob | ||
def perform(scheduled_time); end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Active Job for testing a job with no args | ||
class TestNoArgsJob < ApplicationJob | ||
def perform; end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Sidekiq Worker for testing a worker with no args | ||
class TestNoArgsWorker | ||
include Sidekiq::Worker | ||
def perform; end | ||
end |
4 changes: 2 additions & 2 deletions
4
.../app/jobs/simple_scheduler_test_worker.rb → spec/dummy/app/jobs/test_worker.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Sidekiq Worker for testing | ||
class SimpleSchedulerTestWorker | ||
class TestWorker | ||
include Sidekiq::Worker | ||
def perform(time); end | ||
def perform(scheduled_time); end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
weekly_task: | ||
class: "SimpleSchedulerTestJob" | ||
class: "TestJob" | ||
every: "1.week" | ||
at: "Sun 1:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
hourly_task: | ||
class: "SimpleSchedulerTestJob" | ||
class: "TestJob" | ||
every: "1.hour" | ||
at: "*:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
queue_ahead: 120 | ||
|
||
hourly_task: | ||
class: "SimpleSchedulerTestJob" | ||
class: "TestJob" | ||
every: "1.hour" | ||
at: "*:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
hourly_task: | ||
class: "SimpleSchedulerTestJob" | ||
class: "TestJob" | ||
every: "1.hour" | ||
at: "*:00" | ||
queue_ahead: 180 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
weekly_task: | ||
class: "SimpleSchedulerTestWorker" | ||
class: "TestWorker" | ||
every: "1.week" | ||
at: "Sun 1:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.