We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3f7a54 commit 447e130Copy full SHA for 447e130
app/jobs/puzzle_inventory_check_job.rb
@@ -3,10 +3,10 @@ class PuzzleInventoryCheckJob < ApplicationJob
3
retry_on StandardError, attempts: 3
4
5
def perform
6
- approved_puzzle_count = Puzzle.where(state: 0).count
+ approved_unsent_puzzle_count = Puzzle.where(state: 0, sent_at: nil).count
7
8
- if approved_puzzle_count < 5
9
- send_low_inventory_notification(approved_puzzle_count)
+ if approved_unsent_puzzle_count < 5
+ send_low_inventory_notification(approved_unsent_puzzle_count)
10
end
11
12
0 commit comments