This file contains hidden or 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 boto3 | |
import json | |
from urllib.parse import urlparse | |
BUCKET_NAME = 'bucket-name' | |
session = boto3.Session( | |
aws_access_key_id="secret-id", | |
aws_secret_access_key="secret-access-key" | |
) |
This file contains hidden or 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 com.google.common.annotations.VisibleForTesting; | |
import java.lang.reflect.Field; | |
import java.util.Map; | |
@VisibleForTesting | |
public class Environment { | |
public static void set(String key, String value) { | |
try { | |
Map<String, String> env = System.getenv(); |
This file contains hidden or 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
from datetime import datetime, timedelta | |
import random | |
# Parâmetros default | |
max_attempt = 5 | |
backoff_seconds = 18000 | |
backoff_factor = 2 | |
jitter_min_seconds = 0 | |
jitter_max_seconds = 300 | |
last_attempt_time_str = "25/01/2024 12:00:00" |
OlderNewer