Skip to content

Instantly share code, notes, and snippets.

@drodrz
drodrz / republish_dlq.py
Created March 30, 2021 19:17 — forked from TylerHendrickson/republish_dlq.py
Republish SQS DLQ messages
"""Republishes messages in an AWS SQS dead-letter queue (DLQ)
Useful for moving messages in a DLQ back to a "normal" SQS queue
(e.g. once bugs are fixed or initial error is otherwise resolved).
Workflow:
1. Get a message from the configured source DLQ
2. Publish a new message to the configured destination queue,
using the body of the message from #1
3. After a successful publish, delete the message retrieved in #1 from the DLQ
@drodrz
drodrz / proxies.json
Created April 26, 2019 20:17 — forked from sjkp/proxies.json
Azure Function proxy support
{
"proxies": {
"ListAll": {
"desc": [
"This is the index of examples."
],
"matchCondition": {
"methods": [
"GET"
],
@drodrz
drodrz / models.py
Created August 29, 2018 21:51 — forked from jacobian/models.py
An example of using many-to-many "through" to augment m2m relationships. See http://www.quora.com/How-do-you-query-with-a-condition-on-a-ManyToMany-model-in-Django for context.
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=200)
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people')
class Meta:
ordering = ['name']
def __unicode__(self):