mirror of
https://github.com/archlinux-jerry/buildbot
synced 2024-11-25 06:20:40 +08:00
client.py: chdir
This commit is contained in:
parent
4089802b00
commit
0518ebf199
1 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
# This file is part of Buildbot by JerryXiao
|
# This file is part of Buildbot by JerryXiao
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
from multiprocessing.connection import Client
|
from multiprocessing.connection import Client
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
|
@ -15,6 +16,10 @@ from utils import print_exc_plus
|
||||||
|
|
||||||
logger = logging.getLogger(f'buildbot.{__name__}')
|
logger = logging.getLogger(f'buildbot.{__name__}')
|
||||||
|
|
||||||
|
abspath=os.path.abspath(__file__)
|
||||||
|
abspath=os.path.dirname(abspath)
|
||||||
|
os.chdir(abspath)
|
||||||
|
|
||||||
def run(funcname, args=list(), kwargs=dict(), retries=0, server=(REPOD_BIND_ADDRESS, REPOD_BIND_PASSWD)):
|
def run(funcname, args=list(), kwargs=dict(), retries=0, server=(REPOD_BIND_ADDRESS, REPOD_BIND_PASSWD)):
|
||||||
try:
|
try:
|
||||||
logger.info('client: %s %s %s',funcname, args, kwargs)
|
logger.info('client: %s %s %s',funcname, args, kwargs)
|
||||||
|
@ -41,7 +46,6 @@ if __name__ == '__main__':
|
||||||
from utils import configure_logger
|
from utils import configure_logger
|
||||||
configure_logger(logger)
|
configure_logger(logger)
|
||||||
def print_log():
|
def print_log():
|
||||||
import os
|
|
||||||
os.system(f'tail -n 43 -f \"{CONSOLE_LOGFILE}\"')
|
os.system(f'tail -n 43 -f \"{CONSOLE_LOGFILE}\"')
|
||||||
try:
|
try:
|
||||||
actions = {
|
actions = {
|
||||||
|
|
Loading…
Reference in a new issue