1

I'd like to be able to wrap my code that enqueues tasks in an AppEngine push queue with a transaction so that if any code fails in that transaction the tasks are not committed into the queue. I'm using PHP and am finding no such feature in the documentation.

I'm using Propel2 as my ORM, so ideally I would like to associate them to the Propel2 transactions.

Contrary to that, Python and Java seems to have this support: https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-tasks#enqueuing_tasks_in_cloud_datastore_transactions

Has anyone done this before or can propose ideas?

Thanks.

EthanS
  • 734
  • 1
  • 5
  • 8

1 Answers1

0

The underlying why you can't use this functionality with the PHP SDK is that it doesn't have built-in support for Cloud Datastore. Java and Python both provide this on top of Datastore. I'm not a PHP expert, but Propel2 relies on PDO for transaction support, which seems difficult to square with the task queues API. Short of finding a general-purpose transaction manager for PHP, which seems unlikely, you may find it hard to do what you want. Perhaps it's worth revisiting your approach; sorry I can't be more helpful.

Will Hayworth
  • 1,272
  • 10
  • 22