aboutsummaryrefslogtreecommitdiff
path: root/bugzilla/usr/bin/bugzilla_fetch.py
diff options
context:
space:
mode:
Diffstat (limited to 'bugzilla/usr/bin/bugzilla_fetch.py')
-rwxr-xr-xbugzilla/usr/bin/bugzilla_fetch.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/bugzilla/usr/bin/bugzilla_fetch.py b/bugzilla/usr/bin/bugzilla_fetch.py
deleted file mode 100755
index b4a9805..0000000
--- a/bugzilla/usr/bin/bugzilla_fetch.py
+++ /dev/null
@@ -1,24 +0,0 @@
1#!/usr/bin/env python
2
3import boto3
4import subprocess
5
6
7client = boto3.client("s3")
8bucket = "mcrute-bugs-emails"
9email_bin = "/var/www/html/bugzilla/email_in.pl"
10items = client.list_objects_v2(Bucket=bucket)
11
12
13for item in items["Contents"]:
14 key = item["Key"]
15
16 if key == "AMAZON_SES_SETUP_NOTIFICATION":
17 continue
18
19 body = client.get_object(Bucket=bucket, Key=key)["Body"]
20
21 cmd = subprocess.Popen([email_bin], stdin=subprocess.PIPE)
22 cmd.communicate(body.read())
23
24 client.delete_object(Bucket=bucket, Key=key)