Sam
Sam

Reputation: 31

aiohttp instance variable values shared by different users?

I am testing an aiohttp app with web.run. I instantiate an imported class just after the import declaration and the a value of this instance is changed by data channel( for instance.changevalue() function). It works well for a single user. But when I test this from two users( mobile and laptop at the same time), The changed value from one device is reflected on the other device. Is this because of aiohttp running in standalone? or I am doing something wrong with my class instance?

Upvotes: 0

Views: 25

Answers (1)

Sam
Sam

Reputation: 31

It worked after I used gunicorn to manage more than one process.

Upvotes: 0

Related Questions