-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hi!
I'm facing exception uninitialized constant LiveKit::AccessToken
for the following code
controller:
def show
@token = LiveKit::CreateToken.run!(
token_identity: current_user.to_s,
token_name: @meeting.id,
room_name: @meeting.id
)
end
interactor:
require "livekit"
class LiveKit::CreateToken < ActiveInteraction::Base
string :token_identity
string :token_name
string :room_name
validates :token_identity, presence: true
validates :token_name, presence: true
validates :room_name, presence: true
def execute
token = LiveKit::AccessToken.new(
api_key: Rails.application.credentials.livekit[:api_key],
api_secret: Rails.application.credentials.livekit[:api_secret]
)
token.identity = token_identity
token.name = token_name
token.add_grant(roomJoin: true, room: room_name)
token.to_jwt
end
end
But it looks like an issue with memory management, because when I do restart my app - problem is gone.
Metadata
Metadata
Assignees
Labels
No labels