mirror of
https://github.com/FutaGuard/LowTechFilter.git
synced 2025-06-21 05:21:02 +08:00
move code to main function
This commit is contained in:
parent
104b6beb60
commit
6075a2577f
@ -165,8 +165,9 @@ async def write_files(datalist: List[Dict[str, List[str]]]):
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
async def main():
|
||||
import time
|
||||
|
||||
start = time.time()
|
||||
loop = asyncio.get_event_loop()
|
||||
ph1 = Phase1()
|
||||
@ -180,3 +181,7 @@ if __name__ == "__main__":
|
||||
loop.run_until_complete(write_files([ph1.data, ph2.data, ph3.data, ph4.data]))
|
||||
end = time.time() - start
|
||||
logger.info(f"Time taken: {end:.2f} seconds")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
|
Loading…
x
Reference in New Issue
Block a user