Skip to content

Commit

Permalink
Merge pull request #9 from ucraft-com/hotfix/remove-automation
Browse files Browse the repository at this point in the history
Hotfix/remove automation
  • Loading branch information
david-kocharyan authored Nov 1, 2024
2 parents 30d4fce + 4ad5c75 commit 272867f
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion sensors/kafka_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,31 @@ def run(self):

triggers = self._topic_tiggers[topic_name]

# Note: The email ("automationucraft@gmail.com") statement work only for stage!
for trigger in triggers:
self.sensor_service.dispatch(trigger=trigger, payload=payload)
email = (
payload.get("value", {})
.get("context", {})
.get("user", {})
.get("email", "")
)
print(email)

if email not in [
"automationucraft@gmail.com" "harut.k.petrosyan@gmail.com",
"ucraftbackupuser@gmail.com",
"narinebettest+111888@gmail.com",
"margarit.sh@ucraft.com",
"satine+999@ucraft.com",
"qaucraft@gmail.com",
"elianora123@yahoo.com",
"userucraft@gmail.com",
"ucraft.templates@gmail.com",
]:
self.sensor_service.dispatch(
trigger=trigger, payload=payload
)

except Exception as e:
self._logger.info(str(e))
self._logger.info("Message Faild")
Expand Down

0 comments on commit 272867f

Please sign in to comment.