Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library doesn't update while the script is running #3

Open
aurkaxi opened this issue Jan 28, 2023 · 1 comment
Open

library doesn't update while the script is running #3

aurkaxi opened this issue Jan 28, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Projects
Milestone

Comments

@aurkaxi
Copy link

aurkaxi commented Jan 28, 2023

well, for script.1.py having this updating code which is running 24/7. and let's say script.2.py which is not running.
when script1 update the library for 1 time and resting, if i run script2 to check if the library is updated, yes it is updated
after the delay script1 will check if the library is updated, no it is not.
script2 can access the updated library while the script1 is constantly using previous library. if i stop script1, and run script1 again, it will use the updated library
script1:

import python_avatars as pa
from importlib import reload
from time import sleep

while True:
  pa.install_part("suit.svg", pa.ClothingType)
  sleep(10)
  reload(pa)
  pa.uninstall_part(pa.ClothingType.SUIT)

script2:

try:
  getattr(pa.ClothignType, "SUIT")
  print("found")
except:
  print("doesn't exist")
@ibonn
Copy link
Owner

ibonn commented Jan 31, 2023

This seems a somewhat complex task. As I said in #4, I will try to fix it when I can. Any contributions are welcome too

@ibonn ibonn self-assigned this Jan 31, 2023
@ibonn ibonn added the bug Something isn't working label Jan 31, 2023
@ibonn ibonn added this to To do in v1.4.0 via automation Jan 31, 2023
@ibonn ibonn added this to the 1.4.0 milestone Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
v1.4.0
To do
Development

No branches or pull requests

2 participants