changed to unbeffered output

This commit is contained in:
2023-06-26 10:29:15 +02:00
parent ceab8f480d
commit fe21c4f7f1

View File

@@ -137,7 +137,7 @@ async function startBot(accountName) {
commandSuffix += ' --browser ' + process.env.BOT_BROWSER;
}
let commandPrefix = `python ./Microsoft-Rewards-bot/ms_rewards_farmer.py --accounts-file ../accounts/${accountName}.json --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --skip-unusual`;
let commandPrefix = `python -u ./Microsoft-Rewards-bot/ms_rewards_farmer.py --accounts-file ../accounts/${accountName}.json --dont-check-for-updates --shuffle --session --superfast --on-finish exit --no-webdriver-manager --skip-unusual`;
consoleLog(`[${host}] Script started for ${accountName}`);
if (isRootUser()) {
@@ -152,7 +152,7 @@ async function startBot(accountName) {
return new Promise((resolve, reject) => {
// const childProcess = spawn('bash', ['-c', `${commandPrefix} ${commandSuffix}`], { stdio: 'inherit' });
const childProcess = spawn('bash', ['-c', `${commandPrefix} ${commandSuffix}`], {
stdio: ['pipe', 'inherit', 'pipe'],
stdio: ['pipe', 'pipe', 'pipe'],
});
childProcess.stdout.on('data', (data) => {