def main(): bs = yield from aiobeanstalk.connect(host='localhost', port=11300) # wait for job from *default* tube res_data = yield from bs.reserve() print(res_data) data = yield from bs.delete(res_data['jid']) print(data)
def main(): bs = yield from aiobeanstalk.connect(host="localhost", port=11300) data = yield from bs.put('{"nice":"job"}') print(data)
def c(): # Create connection bs = yield from aiobeanstalk.connect() yield from function(self, bs)