Skip to content

Instantly share code, notes, and snippets.

@queertypes
Created February 6, 2014 16:13
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 queertypes/8847308 to your computer and use it in GitHub Desktop.
Save queertypes/8847308 to your computer and use it in GitHub Desktop.
In [1]: from marconi.queues.storage.sqlite import driver
In [2]: from marconi.openstack.common.cache import cache
In [3]: from oslo.config import cfg
In [4]: sqlite_driver = driver.DataDriver(cfg.ConfigOpts(), cache.get_cache())
In [5]: queue_controller = sqlite_driver.queue_controller
In [6]: queue_controller.create('project_awesome', 'bestest_queue')
Out[6]: True
In [7]: queue_controller.exists('project_awesome', 'bestest_queue')
Out[7]: True
In [8]: queue_controller.exists('project_awesome', 'worstest_queue')
Out[8]: False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment