Compare commits

..

No commits in common. "master" and "v2.6.0" have entirely different histories.

2 changed files with 3 additions and 22 deletions

View File

@ -16,8 +16,6 @@ class Plan
const BOGUS_REINSTALL_APP_EVERY_N = 2;
const IM_THREAD_UPDATE_INTERVAL = 5;
const MaxImTextPostLen = 3000;
public Session $session;
public string $name;
@ -335,7 +333,6 @@ class Plan
$task->getCmd(),
$task->getCmdArgs()
);
$task->ext_cmd_start_time = time();
}
catch(Exception $e)
{
@ -553,7 +550,7 @@ class Plan
static function _printToShellExtItem(Task $task, array $item)
{
$shell_msg = _trim($item['message'], self::MaxImTextPostLen);
$shell_msg = _trim($item['message'], 3000);
if(Task::isProblemCode($item['error']))
$shell_msg = "[PRB] Code:{$item['error']}, $shell_msg";
$shell_msg = "(".round($item['time'],1)."s) {$shell_msg} *{$task->device}*";
@ -563,7 +560,7 @@ class Plan
function _postToMessengerExtStatusItem(Task $task, array $item)
{
$orig_msg = _trim($item['message'], self::MaxImTextPostLen);
$orig_msg = _trim($item['message'], 3000);
$mm_msg = $orig_msg;
if($item['error'] == Task::CODE_EXCEPTION)
@ -642,10 +639,6 @@ class Plan
{
$this->_postToMessengerExtStatusItem($task, $item);
}
else if($item['error'] == Task::CODE_RAW)
{
$this->_postRawDataToMessenger($task, $item['message']);
}
else if($msg_type === '[WRN]')
{
$task->addStatusCode(Task::CODE_WARN);
@ -680,19 +673,11 @@ class Plan
});
}
function _postRawDataToMessenger(Task $task, string $txt)
{
if(strlen($txt) > self::MaxImTextPostLen)
$this->postFileData("Raw data: *{$task->device}*", 'text/plain', $txt, '.txt');
else
$this->post("Raw data: \n```\n$txt\n```\n *{$task->device}*");
}
function _postReplayToMessenger(Task $task, $repl_txt)
{
$repl_txt = _try_lz4_replay($repl_txt);
if(strlen($repl_txt) > self::MaxImTextPostLen)
if(strlen($repl_txt) > 3000)
$this->postFileData("Replay File: *{$task->device}*", 'text/plain', $repl_txt, '.txt');
else
$this->post("Last Replay: \n```\n$repl_txt\n```\n *{$task->device}*");

View File

@ -26,7 +26,6 @@ class Task
const CODE_MESSAGE = 0;
const CODE_EXCEPTION = 1;
const CODE_WARN = 2;
const CODE_RAW = 3;
const CODE_NSTART = 124;
const CODE_STUCK = 125;
const CODE_GONE = 126;
@ -43,8 +42,6 @@ class Task
return "exception";
case self::CODE_WARN:
return "warning";
case self::CODE_RAW:
return "raw";
case self::CODE_STUCK:
return "stuck";
case self::CODE_NSTART:
@ -82,7 +79,6 @@ class Task
public float $start_time = 0;
public float $reset_time = 0;
public float $ext_cmd_start_time = 0;
public float $last_progress = 0;
public int $last_done_arg_idx = -1;