VRFS-1665 prevent session creator from getting notified of sessions
This commit is contained in:
parent
bb03ebffaa
commit
1f726df320
|
|
@ -68,8 +68,12 @@ FROM scores
|
|||
INNER JOIN #{TMP_SESS} ON #{TMP_SESS}.creator_score_idx = scores.alocidispid
|
||||
INNER JOIN #{TMP_RECIP} ON #{TMP_RECIP}.receiver_score_idx = scores.blocidispid
|
||||
WHERE
|
||||
scores.score < #{Score::MAX_YELLOW_LATENCY}
|
||||
GROUP BY #{TMP_RECIP}.receiver_id, #{TMP_SESS}.session_id, latency
|
||||
scores.score < #{Score::MAX_YELLOW_LATENCY} AND
|
||||
#{TMP_RECIP}.receiver_id != #{TMP_SESS}.creator_id
|
||||
GROUP BY
|
||||
#{TMP_RECIP}.receiver_id,
|
||||
#{TMP_SESS}.session_id,
|
||||
latency
|
||||
SQL
|
||||
ActiveRecord::Base.connection.execute(sql)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ describe EmailBatchScheduledSessions do
|
|||
expect(drummer.instruments.include?(drums)).to eq(true)
|
||||
expect(drummer.instruments.include?(guitar)).to eq(true)
|
||||
obj = scheduled_batch.fetch_recipients
|
||||
expect(obj.count).to eq(3)
|
||||
expect(obj.count).to eq(2)
|
||||
end
|
||||
|
||||
it 'sends email' do
|
||||
|
|
|
|||
Loading…
Reference in New Issue