Skip to main content
Héctor Cortiguera
Participating Frequently
Jun 17, 2022 4:29 AM UTC

Switch sessions in uopy

Hi all

I'm trying to work with a session pool in uopy and I'd like to be able to switch between different sessions as it can be done using the command ic_setsession in the uvic32.dll API.

I create them in this fashion:


sesiones = []
for i in range(10):
sesiones.append(
uopy.connect(host='...', user='...', password='...', account='...', encoding='cp850',
service=uopy.UV_SERVICE, port=31438))

Is there a way to do this?
How can I make sesiones[i] the active session at will?

------------------------------
Hector Cortiguera
Rocket Forum Shared Account
------------------------------

    2 replies

    Héctor Cortiguera
    Participating Frequently
    Jun 17, 2022 6:14 AM UTC
    Hi all

    I'm trying to work with a session pool in uopy and I'd like to be able to switch between different sessions as it can be done using the command ic_setsession in the uvic32.dll API.

    I create them in this fashion:


    sesiones = []
    for i in range(10):
    sesiones.append(
    uopy.connect(host='...', user='...', password='...', account='...', encoding='cp850',
    service=uopy.UV_SERVICE, port=31438))

    Is there a way to do this?
    How can I make sesiones[i] the active session at will?

    ------------------------------
    Hector Cortiguera
    Rocket Forum Shared Account
    ------------------------------
    Elaborating on this theme:

    I'd like to have a pool of sessions that are alive and connected everytime I do the call to uopy.connect, because each session has a series of caches server-side that are cleared on disconnection.

    So, a pool where sessions are unexpectedly closed won't be optimal for me.

    Do I need to "refresh" them from time to time?
    How can I check all the sessions in the pool and make them stay alive?

    ------------------------------
    Hector Cortiguera
    Rocket Forum Shared Account
    ------------------------------
    Jun 17, 2022 7:12 AM UTC
    Elaborating on this theme:

    I'd like to have a pool of sessions that are alive and connected everytime I do the call to uopy.connect, because each session has a series of caches server-side that are cleared on disconnection.

    So, a pool where sessions are unexpectedly closed won't be optimal for me.

    Do I need to "refresh" them from time to time?
    How can I check all the sessions in the pool and make them stay alive?

    ------------------------------
    Hector Cortiguera
    Rocket Forum Shared Account
    ------------------------------
    Hector,

    Would Connection Pooling assist here?
    Regards,

    JJ

    ------------------------------
    John Jenkins
    Principal Technical Support Engineer
    Rocket Software Limited
    U.K.
    ------------------------------