Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gzukowski committed Jan 23, 2024
1 parent 3937a81 commit 5132128
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions python/ChimpInsert/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"slack_api_url" : "",
"slack_channel_id" : "",
"slack_hook_url" : "",
"mailchimp_api" : "",
"audience_id" : "",
"mailchimp_server" : ""
Expand Down
2 changes: 1 addition & 1 deletion python/ChimpInsert/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ async def post_slackMSG(self, text):
try:
response = requests.post(self.slack_api_url, headers=self.token_header, data=str({"text":f"{text}"}))
except Exception as error:
self.logger.error("ChimpInsert: Failed to send a request to slack.")
return SlackHookResponse.FAILURE.value

if response.status_code != SlackHookResponse.SUCCESS.value:
Expand Down Expand Up @@ -114,6 +113,7 @@ async def insert_info(self, info):
return
response = self.mailchimp.lists.update_list_member(self.audience_id, user_id, {"status" : "subscribed"})
self.logger.info(f"ChimpInsert: {email} Auth0 user with newsletter successfully added")
slack_message_resp = await self.post_slackMSG("Auth0 user with newsletter successfully added")

elif TopicInfo.STRIPE.value in lname:
response = self.mailchimp.lists.get_list_members_info(self.audience_id, offset=self.get_offset(self.audience_id))
Expand Down
1 change: 0 additions & 1 deletion python/Stripe/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ async def run(context, input):
stripeReader = Stripe(stream, stripe.api_key, context.logger)
except Exception as error:
raise Exception(f"Config not loaded: {error}")
return
asyncio.gather(stripeReader.get_event(), return_exceptions=True)
return stream.map(lambda x : x + "\n")

0 comments on commit 5132128

Please sign in to comment.