aws-samples / aws-samples/aws-serverless-connect-wallboard

Callback Queue & Lamba Error

Open
#23 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
34
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I'm looking for some pointers for this error. We've added a callback queue so if customers are waiting longer that 45 seconds they can request a callback.

I'm trying to add this to the wallboard, but whenever I update the YAML file with this (References obscured)

# QUEUE CALLBACKS
- Source: CALLBACKS_SUPPORT_QUEUE_NAME
Description: Agents available in basic queue (real-time)
Reference: aadcad54-XXXXXXXXXXXXXXX:47b9ec0d-YYYYYYYYYYYYYYYYYYY:QUEUE
- Source: CALLBACKS_AGENTS_ONLINE
Description: Agents logged in (real-time)
Reference: aadcad54-XXXXXXXXXXXXXXX:47b9ec0d-YYYYYYYYYYYYYYYYYYY::AGENTS_ONLINE
- Source: CALLBACKS_AGENTS_AVAILABLE
Description: Agents available in basic queue (real-time)
Reference: aadcad54-XXXXXXXXXXXXXXX:47b9ec0d-YYYYYYYYYYYYYYYYYYY::AGENTS_AVAILABLE
- Source: CALLBACKS_AGENTS_ON_CALL
Description: Agents on a call (real-time)
Reference: aadcad54-XXXXXXXXXXXXXXX:47b9ec0d-YYYYYYYYYYYYYYYYYYY:AGENTS_ON_CALL
- Source: CALLBACKS_CONTACTS_IN_QUEUE
Description: Contacts waiting in basic queue (real-time)
Reference: aadcad54-XXXXXXXXXXXXXXX:47b9ec0d-YYYYYYYYYYYYYYYYYYY:CONTACTS_IN_QUEUE
- Source: CALLBACKS_OLDEST_CONTACT_AGE
Description: Longest waiting contact in basic queue (real-time)
Reference: aadcad54-XXXXXXXXXXXXXXX:47b9ec0d-YYYYYYYYYYYYYYYYYYY:OLDEST_CONTACT_AGE

I get this error

[ERROR] ValueError: range() arg 3 must not be zero
Traceback (most recent call last):
File "/var/task/get-historical-metrics.py", line 220, in lambda_handler
GetHistoricalData()
File "/var/task/get-historical-metrics.py", line 181, in GetHistoricalData
for QueueList in ProcessChunks(list(ConnectList[Instance].keys()), ChunkSize):
File "/var/task/get-historical-metrics.py", line 78, in ProcessChunks
return (List[Pos:Pos+Size] for Pos in range(0, len(List), Size))

The only way to fix this and get the Lamda function running again, is to clear the DB and reimport the YAML without the callback queue. To Callback queues work differently to other queues. Any pointers to the cause would be greatful :)

Contributor guide

Open the contributing guide

Research direction

Start with get-historical-metrics.py, especially ProcessChunks at line 78 and GetHistoricalData around line 181; reproduce the failure by importing the callback queue YAML. Trace how ChunkSize is obtained when the callback queue configuration is present and verify why it becomes zero. Done means the configuration imports without clearing the database and the Lambda function runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.