Skip to content

Commit

Permalink
iterate over all tenants
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Chatterjee committed Sep 2, 2024
1 parent f0fb7bd commit d85eee8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,11 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
end_date = datetime.today()
end_date = pytz.IST.localize(end_date).astimezone(pytz.utc)

streams = []

for tenantid in self.config["tenantids"]:
# Generate streams for each object type
streams = [
streams += [
MgramsevaPayments(self.headers, self.request_info, self.user_request, tenantid),
MgramsevaTenantExpenses(self.headers, self.request_info, self.user_request, tenantid, start_date, end_date),
MgramsevaDemands(self.headers, self.request_info, self.user_request, tenantid),
Expand All @@ -365,4 +367,4 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:

streams.append(MgramsevaBills(self.headers, self.request_info, self.user_request, tenantid, list(consumer_codes)))

return streams
return streams

0 comments on commit d85eee8

Please sign in to comment.