Skip to content

Commit

Permalink
fix: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
interu committed Apr 20, 2024
1 parent 3eb6614 commit 6bbf863
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/sg_fargate_rails/event_bridge_schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create_start_execution_state_machine(group_name:, cluster_arn:)
schedule_expression: @cron,
schedule_expression_timezone: timezone,
target: {
arn: state_machine_arn(cluster_arn),
arn: state_machine_arn(group_name, cluster_arn),
input: input_overrides_json,
retry_policy: {
maximum_event_age_in_seconds: 120,
Expand Down Expand Up @@ -124,7 +124,7 @@ def region
ENV['AWS_REGION'] || 'ap-northeast-1'
end

def state_machine_arn(cluster_arn)
def state_machine_arn(group_name, cluster_arn)
# TODO: account_id はメソッドにする
account_id = cluster_arn.split(':')[4]
"arn:aws:states:#{region}:#{account_id}:stateMachine:#{group_name}-rails-state-machine"
Expand Down

0 comments on commit 6bbf863

Please sign in to comment.