Initial YakPanel commit
This commit is contained in:
26
Yak-Task
Normal file
26
Yak-Task
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/www/server/panel/pyenv/bin/python
|
||||
# coding: utf-8
|
||||
# +-------------------------------------------------------------------
|
||||
# | YakPanel
|
||||
# +-------------------------------------------------------------------
|
||||
# | Copyright (c) 2015-2099 YakPanel (https://www.yakpanel.com) All rights reserved.
|
||||
# +-------------------------------------------------------------------
|
||||
# | Author: hwliang <hwl@yakpanel.com>
|
||||
# +-------------------------------------------------------------------
|
||||
import argparse
|
||||
import os
|
||||
|
||||
os.chdir('/www/server/panel')
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='YakPanel task service')
|
||||
parser.add_argument(
|
||||
'--max-workers',
|
||||
type=int,
|
||||
default=None,
|
||||
help='Maximum number of worker threads'
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
from YakTask import task
|
||||
task.main(max_workers=args.max_workers)
|
||||
Reference in New Issue
Block a user