Skip to content
Permalink
Browse files
Use the cheaper ASG in Ohio (#24)
  • Loading branch information
ashb committed May 7, 2021
1 parent 7b181a0 commit 97579acca38d3584104715a4da91c6bd15389dea
Showing 2 changed files with 4 additions and 2 deletions.
@@ -11,7 +11,8 @@
"iam_policy_file": "prod_iam.json",
"environment_variables": {
"GH_WEBHOOK_TOKEN_ENCRYPTED": "AQICAHg1MGVq8MAqYXSkkgy6iL19KSI14nJw8DelmHFuRpAfvQEh/mniWicOD0N1aVuHhp+VAAAAfDB6BgkqhkiG9w0BBwagbTBrAgEAMGYGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMVqkAu70BaR2rDQ4qAgEQgDlIAxDrBlblL6XNKkJIs+zrNEMcGpS68JnoVh2s1oKEzbBXzYS16/9ZrW9CwUV4ULAd2EsGb90iz74=",
"ACTIONS_SQS_URL": "https://sqs.eu-central-1.amazonaws.com/827901512104/actions-runner-requests"
"ASG_NAME": "RunnerASG",
"ASG_REGION_NAME": "us-east-2"
}
}
},
@@ -30,6 +30,7 @@
app.log.setLevel(logging.INFO)

ASG_GROUP_NAME = os.getenv('ASG_NAME', 'AshbRunnerASG')
ASG_REGION_NAME = os.getenv('ASG_REGION_NAME', None)
TABLE_NAME = os.getenv('COUNTER_TABLE', 'GithubRunnerQueue')
_commiters = set()
GH_WEBHOOK_TOKEN = None
@@ -177,7 +178,7 @@ def increment_dynamodb_counter(delta: int = 1) -> int:


def scale_asg_if_needed(num_queued_jobs: int) -> dict:
asg = boto3.client('autoscaling')
asg = boto3.client('autoscaling', region_name=ASG_REGION_NAME)

resp = asg.describe_auto_scaling_groups(
AutoScalingGroupNames=[ASG_GROUP_NAME],

0 comments on commit 97579ac

Please sign in to comment.