小赖子的英国生活和资讯

因为一个 try catch 好几天优秀点赞程序挂掉了我却以为是节点的问题

阅读 桌面完整版

YY银行有四个点赞程序, 分别跑于四台服务器上, 它们是:

这几天我就发现, 有些赞没有给出, 我还以为是节点的原因, 因为查看记录, 发现是

Unexpected Type Error

后来才发现, 因为少打一个字符, 把 vp 写成 v 结果被 try-catch 掉了. 这就是为什么尽量不要捕获所有的异常 而是尽量 throw often and catch rarely

啥是优秀作者?

除了日报中的前30名, 银行还会跟随点赞, 比如 参考 @abit 大神的过去2天的点赞列表:

1
2
3
4
5
6
7
8
9
10
11
SELECT 
  top 30 author 
FROM 
  TxVotes (NOLOCK) 
where 
  (voter='abit') and 
  datediff(hour, timestamp, GetUTCDate()) between 0 and 48
group by 
  author
order by 
  sum(weight) desc
SELECT 
  top 30 author 
FROM 
  TxVotes (NOLOCK) 
where 
  (voter='abit') and 
  datediff(hour, timestamp, GetUTCDate()) between 0 and 48
group by 
  author
order by 
  sum(weight) desc

并按权重从大到小排序.

互利点赞

如果银行发现你给银行点赞了, 那么也就是获取过去36小时内给银行点赞比例至少为10%的列表.

1
2
3
4
5
6
7
8
9
10
11
12
select 
  voter, sum(weight) 
from
  TxVotes (NOLOCK)
where
  author = 'justyy' and
  datediff(hour, timestamp, GetUTCDate()) between 0 and 36 and
  weight >= 1000  
group by
  voter
order by 
  count(1) desc
select 
  voter, sum(weight) 
from
  TxVotes (NOLOCK)
where
  author = 'justyy' and
  datediff(hour, timestamp, GetUTCDate()) between 0 and 36 and
  weight >= 1000  
group by
  voter
order by 
  count(1) desc

对于这些支持银行的人, 不论是优秀作者或者是股东都会给予小额额外点赞比例的奖励的.

强烈推荐

微信公众号: 小赖子的英国生活和资讯 JustYYUK

阅读 桌面完整版
Exit mobile version