Skip to content

ArkoClub/arko-reloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arko Reloader

支持自动重载的重载器

import time
from multiprocessing import Queue

from arko.utils.reloader import Process, Reloader, SIGNAL


def test(signal_queue: Queue):
    from random import choice

    if result := choice([False, True]):
        signal_queue.put(SIGNAL.RELOAD)

    print(f"Reload: {result}")
    time.sleep(1)
    print(time.time())


def main():
    signal_queue = Queue()
    reloader = Reloader(
        Process(test, signal_queue=signal_queue), process_signal_queue=signal_queue
    )
    reloader.run(background=False)


if __name__ == "__main__":
    main()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages