Skip to content

Commit

Permalink
Merge pull request #21 from openstates/fix-chamber-processing-error
Browse files Browse the repository at this point in the history
Fix 'chamber' bill processing django ORM error
  • Loading branch information
jessemortenson authored Oct 2, 2024
2 parents 186221f + 771c43f commit 7990c7a
Show file tree
Hide file tree
Showing 4 changed files with 1,196 additions and 775 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Run the following commands to setup the project
poetry install
```

### ZAPPA BUG NOTE

Please note that right now setuptools is pinned to an old version to mitigate a Zappa bug that was very recently fixed,
but seems to not be released in any easy-to-poetry-install way. [Bug details here.](https://github.com/zappa/Zappa/issues/1349)

## Deployment

Deployment depends on setup above, as well as having the
Expand Down
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def retrieve_messages_from_queue():

# Delete received message from queue
sqs.delete_message(QueueUrl=sqs_url, ReceiptHandle=receipt_handle)
logger.info(f"Received and deleted message: {receipt_handle}")
logger.debug(f"Received and deleted message: {receipt_handle}")
return message_bodies


Expand All @@ -243,7 +243,9 @@ def batch_retrieval_from_sqs(batch_size=600):
msg.extend(retrieve_messages_from_queue())
filtered_messages = remove_duplicate_message(msg)

logger.info(f"message_count: {len(filtered_messages)}")
logger.info(
f"message_count: {len(filtered_messages)} received & deleted from SQS"
)
return filtered_messages


Expand Down
Loading

0 comments on commit 7990c7a

Please sign in to comment.