Skip to content

Commit a9783ab

Browse files
fix: updated ptq to use updated cloud-volume semantics
1 parent c823860 commit a9783ab

4 files changed

Lines changed: 28 additions & 5 deletions

File tree

‎ChangeLog‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
CHANGES
22
=======
33

4+
0.4.0
5+
-----
6+
7+
* feat: specify lease seconds through LEASE\_SECONDS environemnt var
8+
9+
0.3.2
10+
-----
11+
12+
* fix: error in printing out bad queue urls
13+
14+
0.3.1
15+
-----
16+
17+
* fix: forgot to include numpy in RegisteredTask
18+
19+
0.3.0
20+
-----
21+
22+
* refactor: simplified AppEngineTaskQueueAPI (#4)
23+
424
0.2.1
525
-----
626

‎requirements.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ cloud-volume>=0.10.1
22
google-api-python-client
33
google-cloud>=0.32
44
google-auth-httplib2==0.0.2
5-
numpy==1.13.3
6-
pytest==3.3.1
5+
numpy>=1.13.3
6+
pytest>=3.3.1
77
pbr
88
tqdm==4.19.5
99
requests>2,<3

‎taskqueue/aws_queue_api.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ def __init__(self, qurl):
1515
raise ValueError(str(qurl) + ' is not a valid SQS url.')
1616
region_name, = matches.groups()
1717

18+
credentials = aws_credentials()
19+
1820
self._qurl = qurl
1921
self._sqs = boto3.client('sqs',
2022
region_name=region_name,
21-
aws_secret_access_key=aws_credentials['AWS_SECRET_ACCESS_KEY'],
22-
aws_access_key_id=aws_credentials['AWS_ACCESS_KEY_ID'],
23+
aws_secret_access_key=credentials['AWS_SECRET_ACCESS_KEY'],
24+
aws_access_key_id=credentials['AWS_ACCESS_KEY_ID'],
2325
)
2426

2527
@property

‎taskqueue/google_queue_api.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ def _create_connection(self):
2020
# scopes needed
2121
# 'https://www.googleapis.com/auth/cloud-platform',
2222
# 'https://www.googleapis.com/auth/cloud-tasks',
23-
return AuthorizedSession(google_credentials)
23+
project, credentials = google_credentials()
24+
return AuthorizedSession(credentials)
2425

2526
def _close_function(self):
2627
return lambda conn: conn.close()

0 commit comments

Comments
 (0)