Skip to content

Instantly share code, notes, and snippets.

@elliotttf
Created December 20, 2011 19:16
Show Gist options
  • Save elliotttf/1502817 to your computer and use it in GitHub Desktop.
Save elliotttf/1502817 to your computer and use it in GitHub Desktop.
Transaction comment
<?php
// This is a bit hacky, but here's why: node_save is wrapped in a
// transaction which means that our keeper info won't be written
// to the database until after everything in node_save finishes.
// That would be fine except for the fact that we're asynchronously
// interacting with the PuSH hub. When the hub calls back to Drupal
// the keeper info still hasn't been written to the database.
// To avoid the problem this causes we're making subscription requests
// on node load. Lord have mercy on my soul.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment