This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Retry | |
{ | |
public static async Task<T> DoAsync<T>(Func<Task<T>> action, | |
Func<T, bool> validateResult = null, | |
int maxRetries = 10, int maxDelayMilliseconds = 2000, int delayMilliseconds = 200) | |
{ | |
var backoff = new ExponentialBackoff(delayMilliseconds, maxDelayMilliseconds); | |
var exceptions = new List<Exception>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import boto.sqs | |
import json | |
import os | |
parser = argparse.ArgumentParser(description='Saves all messages from an AWS SQS queue into a folder.') | |
parser.add_argument( | |
'-q', '--queue', dest='queue', type=str, required=True, | |
help='The name of the AWS SQS queue to save.') |