Skip to content

Instantly share code, notes, and snippets.

@dsalahutdinov
Created July 2, 2014 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsalahutdinov/2cb38c8874e0f0540935 to your computer and use it in GitHub Desktop.
Save dsalahutdinov/2cb38c8874e0f0540935 to your computer and use it in GitHub Desktop.
pgqworks
-- sample pgq working example with internal ticker call
select pgq.create_queue('LogEvent');
select pgq.insert_event('LogEvent', 'data', 'DataFor123');
select pgq.register_consumer('LogEvent', 'TestConsumer');
select pgq.ticker();
select pgq.next_batch('LogEvent', 'TestConsumer');
select pgq.get_batch_events(1);
select pgq.finish_batch(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment