Skip to content

Commit

Permalink
close #2186 hotfix guests caller job
Browse files Browse the repository at this point in the history
  • Loading branch information
theachoem committed Dec 24, 2024
1 parent 367a4cf commit 0620f1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def call
assign_token_and_create_session_to_db
log_to_firebase

call_other_waiting_guests
# commented because of following bug: https://github.com/channainfo/commissioner/issues/2185
# this job is already run every 1mn, disabling it still work.
# call_other_waiting_guests
end

def full?
Expand Down Expand Up @@ -50,9 +52,7 @@ def log_to_firebase
end

def call_other_waiting_guests
# disabled because of following bug: https://github.com/channainfo/commissioner/issues/2185
# this job is already run every 1mn, disabling it still work.
# SpreeCmCommissioner::WaitingGuestsCallerJob.perform_later
SpreeCmCommissioner::WaitingGuestsCallerJob.perform_later
end

def expired_at
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
allow_any_instance_of(described_class).to receive(:log_to_firebase)
allow_any_instance_of(described_class).to receive(:full?).and_return(false)

context = described_class.call(remote_ip: '43.230.192.190', waiting_guest_firebase_doc_id: 'FYFFEj0O4QSpipNsHzRh')
# https://github.com/channainfo/commissioner/issues/2185
expect_any_instance_of(described_class).not_to receive(:call_other_waiting_guests)
expect(SpreeCmCommissioner::WaitingGuestsCallerJob).not_to receive(:perform_later)

context = described_class.call(remote_ip: '43.230.192.190', waiting_guest_firebase_doc_id: 'FYFFEj0O4QSpipNsHzRh', page_path: '/tickets/sai')
expect(context.room_session.jwt_token.present?).to be true
expect(context.room_session.jwt_token).to eq context.jwt_token
expect(context.room_session.page_path).to eq '/tickets/sai'
end
end
end

0 comments on commit 0620f1b

Please sign in to comment.