Redis context

Redis is used for publishing processing events. Message is published to chanel ‘luna-sender:{account_id}’ in format msg_to_luna_sender.

class luna_handlers.redis_db.redis_context.RedisContext(host='127.0.0.1', port=6379, username=None, password=None, sentinels=None, sentinelUsername=None, sentinelPassword=None, masterName=None, dbNumber=None, channelName='luna-sender', storageTime=None)[source]

Redis context

async publish(events, accountId, requestId)[source]

Publish events. Msg is published to channel ‘luna-sender:{account_id}’ in format: msg_to_luna_sender

Return type:

None

Parameters:
  • events – events

  • accountId – account id

  • requestId – request id

async publishRawEvent(event, accountId, handlerId, requestId)[source]

Publish events. Msg is published to channel ‘luna-sender:{account_id}’ in format: msg_to_luna_sender

Return type:

None

Parameters:
  • event – user raw event

  • accountId – account id

  • handlerId – handler id

  • requestId – request id