Univention Bugzilla – Attachment 10651 Details for
Bug 52521
Make ucsschool-veyon-client thread safe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test threading manually
qa_veyon_client_thread_safe.py (text/x-python), 1.27 KB, created by
Tobias Wenzel
on 2021-03-18 08:57:28 CET
(
hide
)
Description:
test threading manually
Filename:
MIME Type:
Creator:
Tobias Wenzel
Created:
2021-03-18 08:57:28 CET
Size:
1.27 KB
patch
obsolete
>import threading > >from ucsschool.veyon_client.client import VeyonClient >from ucsschool.veyon_client.models import AuthenticationMethod > >VEYON_KEY_FILE = "/etc/ucsschool-veyon/key.pem" > >with open(VEYON_KEY_FILE, "r") as fp: > key_data = fp.read().strip() > >client = VeyonClient( > "http://localhost:11080/api/v1", > credentials={"keyname": "teacher", "keydata": key_data}, > auth_method=AuthenticationMethod.AUTH_KEYS, >) > > >def create_session(): > # host ~ windows client > # default would be the ucs host -> connection timeout > print(client._get_connection_uid(host="10.200.47.13")) > > >if __name__ == "__main__": > # this was used as a rough qa for `Bug 52521 - Make ucsschool-veyon-client thread safe > > threads = [] > > for i in range(50): > x = threading.Thread(target=create_session) > threads.append(x) > x.start() > > for index, thread in enumerate(threads): > thread.join() > > # before fix > # e84e9c18-1d65-426d-9ff5-b4567deb29d0 > # 56e919ce-79f8-4ac5-9677-dc977b41b362 > # cadc162e-d604-48c9-bee6-8684f97c0e9d > # 6a2a2e83-dabf-46ba-a6e2-bc1813fa5193 > > # after fix > # 86efe23e-24fd-4a5b-9439-e80a1fe865e4 > # 86efe23e-24fd-4a5b-9439-e80a1fe865e4 > # 86efe23e-24fd-4a5b-9439-e80a1fe865e4 > # 86efe23e-24fd-4a5b-9439-e80a1fe865e4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 52521
: 10651