Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

签到失败, Request failed with status code 504 #142

Open
xiaozun3 opened this issue Nov 29, 2023 · 8 comments
Open

签到失败, Request failed with status code 504 #142

xiaozun3 opened this issue Nov 29, 2023 · 8 comments

Comments

@xiaozun3
Copy link

设置了时间自动执行会出现这个错误 签到失败, Request failed with status code 504 ,再点一次运行就可以执行成功

@veryqun
Copy link

veryqun commented Nov 30, 2023

是的 我也也是有这个问题,需要手动运行才可以

@MrArlong
Copy link

MrArlong commented Dec 3, 2023

我也开始出现这个问题了,出现两次了

@neverno
Copy link

neverno commented Dec 13, 2023

我偶尔也出现 @mrabit

@mrabit
Copy link
Owner

mrabit commented Dec 13, 2023

后续会加上签到错误重试的逻辑 可能得等待一段时间 最近没太多时间处理

@Martinxux
Copy link

+1,大佬空闲时间别忘了哈,我昨天拉取得,今天也出现了这个情况。
另外想问下,README中有个QL_PATH这个是什么作用呢?

@MrArlong
Copy link

我是直接执行两次任务了,这样第一次失败第二次成功

@WYC-2020
Copy link

WYC-2020 commented Mar 8, 2024

是的我也是这样一个情况

@WYC-2020
Copy link

WYC-2020 commented Mar 8, 2024

function sign_in(access_token, remarks, retry = false) {
  const sendMessage = [remarks];
  
  const doSignIn = () => {
    return axios(signinURL, {
      method: 'POST',
      data: {
        isReward: false
      },
      headers: {
        Authorization: access_token,
        'Content-Type': 'application/json'
      }
    })
    .then(d => d.data)
    .then(async json => {
      if (!json.success) {
        sendMessage.push('签到失败', json.message);
        if (!retry) {
          sendMessage.push('进行重试...');
          return sign_in(access_token, sendMessage.join(', '), true);
        } else {
          return Promise.reject(sendMessage.join(', '));
        }
      }

      sendMessage.push('签到成功');

      // 其他业务逻辑...

      return sendMessage.join(', ');
    })
    .catch(e => {
      sendMessage.push('签到失败');
      sendMessage.push(e.message);
      if (!retry) {
        sendMessage.push('进行重试...');
        return sign_in(access_token, sendMessage.join(', '), true);
      } else {
        return Promise.reject(sendMessage.join(', '));
      }
    });
  };

  return doSignIn();
}

稍微改了加了重试,明天测试一下

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants