Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to create multiple Swift connections?

I'm using the python-swiftclient api, and am attempting get the multithreading to work. I'm having issues creating multiple connections to Swift. The documentation I'm referring to is here:

And the function get_conn() looks like this:

def get_conn():
    return swiftclient.client.Connection(user=user, key=key, authurl=url)

I pass get_conn() to the connection_maker param for the queue_manager(), but the connection returned is always the same; as a result when I try to run PUTs in parallel the objects get overwritten. How do I create multiple Swift connections using the same login credentials?