Releases: talkiq/gcloud-aio
Releases · talkiq/gcloud-aio
auth-0.6.2
Minor
- bump
gcloud-aio-core
dependency to require bugfix for string/bytes encoding
taskqueue-1.0.0
This release migrates to Cloudtasks v2beta2. We've taken the opportunity to clean up the TaskManager
and TaskQueue
usage in response to this change, with the non-backwards-compatible changes described below.
Major changes
deserialize_task
has been replaced withdecode
andencode
. Usage:
await tq.insert(encode(payload))
leased_payload = decode((await tq.lease(num_tasks=1))['tasks'][0]['pullMessage']['payload'])
assert payload == leased_payload
TaskQueue
has been re-written from the ground up. Notable changes:- the constructor now accepts a
location
parameter, which you can find in your Cloudtasks dashboard insert_task,
delete_task, and
renew_taskhave been renamed to
insert,delete
, andrenew
- A bunch of new methods have been added for interfacing with task entities:
ack
,cancel
,drain
,get
,lease
,list
, andrenew
- The task entity format has changed with the new v2beta2 API! The most important changes are as follows:
id
has been re-branded asname
. Accordingly,TaskQueue
methods now acceptname
s rather thanid
s.- Some operations (
ack
,cancel
,renew
) can only be performed by the consumer which originally leased that task. Accordingly, those methods now requiretask
entities be passed in, rather than justname
s, to prove that the consumer is indeed the task leaser. task['payloadBase64']
has been moved totask['pullMessage']['payload']
(it is still base64-encoded, see aboveencode
anddecode
convenience methods.task['pullMessage']['tag']
is now exposed.
- the constructor now accepts a
TaskManager
constructor has changed.task_queue
has been replaced withproject,
service_file, and
taskqueue(eg. the
TaskManagerinstance will construct its own
TaskQueuefrom these parameters).
location,
session, and
tokenare optional values which will be passed to the
TaskQueue` constructor.poll_interval
andmax_poll_interval
have been replaced withbackoff_base
andbackoff_max_value
, and an additional parameterbackoff_factor
has been added. We now backoff exponentially according to thebackoff_factor
, rather than linearly as before.deadletter_upsert
has been renamed todeadletter_insert_function
- The
worker
method no longer decodes tasks as json objects. This allows for support of non-json-ified payloads. If your tasks are json-encoded, the first line of yourworker
method should now be... = json.loads(payload)
OldTaskManager(self, task_queue, worker, deadletter_upsert=None, lease_seconds=10, poll_interval=1, max_poll_interval=30.0, max_concurrency=20, batch_size=1, retry_limit=50)
NewTaskManager(self, project, service_file, taskqueue, worker, backoff_base=2, backoff_factor=1.1, backoff_max_value=60, batch_size=1, deadletter_insert_function=None, lease_seconds=10, location=LOCATION, max_concurrency=20, retry_limit=None, session=None, token=None)
TaskManager
andTaskQueue
stat collection methods have been disabled. Google plans to re-introduce these in the future, at which point we will pass those through here.LocalTaskManager
has been removed, since its only real use was in stats collection. It may be re-introduced when stats collection is re-enabled, but we recommend simply mockingTaskManager
when running tests which would have previously used theLocalTaskManager
.- This library no longer relies on
gcloud-aio-core
, which will gradually be phased out of allgcloud-aio-*
libraries, orujson
. It does, though, now rely onaiohttp
version2.0.0
or greater. - As always, see the smoke tests for more information
auth-0.6.1
Dependencies
- bump aiohttp dependency to latest major version (
2.x
)
taskqueue-0.7.1
- feature: add performance-timing hook-ins to
LocalTaskQueue
object (queue.duration
andqueue.start_time
). - feature: allow arbitrary
on_empty
method call inLocalTaskQueue
object (eg.LocalTaskQueue(on_empty=lambda: print(self.duration))
)
datastore-0.5.0
Initial gcloud-aio-datastore
release.
pubsub-0.5.0
- feat(pubsub): initial asynchronous pubsub subscriber
- feat(pubsub): add
create_if_missing
abstraction for topics and subscriptions
taskqueue-0.7.0
- chore(taskqueue): update core lib usage for utils.aio -> aio migration
- feat(taskqueue): move core.utils.b64 into taskqueue.utils
- feat(taskqueue): export taskqueue.deserialize_task
- refactor(taskqueue): move core.utils.misc.backoff into taskmanager
- fix(taskqueue): fix logger name
core-0.7.0
- refactor(core): Move core.utils.aio to core.aio
- chore(core): remove unused core.utils.b64
- chore(core): remove unused core.utils.aio methods
- feat(core): require future in AState
- chore(core): remove core.utils.jason
- chore(core): remove core.utils.misc
- chore(core): remove core.fire requirement from tests
auth-0.6.0
- chore(auth): update core lib usage for utils.aio -> aio migration
- refactor(auth): remove utils.jason requirement
taskqueue-0.6.0
- feat(taskqueue): implement taskmanager