@@ -64,7 +64,7 @@ def get_tasks(
64
64
"account_agreement_type" : billing_account_agreement_type ,
65
65
"collect_scope" : "customer_tenant_id" ,
66
66
"customer_tenants" : divided_customer_tenant_info ,
67
- "tenant_id " : secret_data ["tenant_id" ],
67
+ "billing_tenant_id " : secret_data ["tenant_id" ],
68
68
}
69
69
}
70
70
)
@@ -82,7 +82,7 @@ def get_tasks(
82
82
"account_agreement_type" : billing_account_agreement_type ,
83
83
"collect_scope" : "customer_tenant_id" ,
84
84
"customer_tenants" : first_sync_tenants ,
85
- "tenant_id " : secret_data ["tenant_id" ],
85
+ "billing_tenant_id " : secret_data ["tenant_id" ],
86
86
"is_sync" : False ,
87
87
}
88
88
}
@@ -98,20 +98,6 @@ def get_tasks(
98
98
synced_accounts = self ._extend_synced_accounts (
99
99
synced_accounts , first_sync_tenants
100
100
)
101
- # Benefit Job Task
102
- if options .get ("cost_metric" ) == "AmortizedCost" :
103
- tasks .append (
104
- {
105
- "task_options" : {
106
- "start" : start_month ,
107
- "account_agreement_type" : billing_account_agreement_type ,
108
- "collect_scope" : "billing_account_id" ,
109
- "tenant_id" : secret_data ["tenant_id" ],
110
- "is_benefit_job" : True ,
111
- }
112
- }
113
- )
114
-
115
101
else :
116
102
tasks = [
117
103
{
@@ -125,6 +111,20 @@ def get_tasks(
125
111
changed = [{"start" : start_month }]
126
112
synced_accounts = []
127
113
114
+ # Benefit Job Task
115
+ if options .get ("cost_metric" ) == "AmortizedCost" :
116
+ tasks .append (
117
+ {
118
+ "task_options" : {
119
+ "start" : start_month ,
120
+ "account_agreement_type" : billing_account_agreement_type ,
121
+ "collect_scope" : "billing_account_id" ,
122
+ "billing_tenant_id" : secret_data ["tenant_id" ],
123
+ "is_benefit_job" : True ,
124
+ }
125
+ }
126
+ )
127
+
128
128
elif secret_type == "USE_SERVICE_ACCOUNT_SECRET" :
129
129
subscription_id = secret_data .get ("subscription_id" , "" )
130
130
tenant_id = secret_data .get ("tenant_id" )
@@ -134,7 +134,7 @@ def get_tasks(
134
134
"collect_scope" : "subscription_id" ,
135
135
"start" : start_month ,
136
136
"subscription_id" : subscription_id ,
137
- "tenant_id " : tenant_id ,
137
+ "billing_tenant_id " : tenant_id ,
138
138
}
139
139
}
140
140
]
0 commit comments