start=>start: 定时任务
log=>operation: 记录请求日志
log2=>operation: 记录响应日志
query=>operation: 查询待推送数据
map=>operation: 转换为 API 请求对象
push=>operation: 请求 API
cond=>condition: 是否返回成功
state=>end: 修改状态
next=>end: 等待下一次定时任务
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# path | |
# C:\Program Files\PowerShell\7 | |
function set_proxy { | |
$proxy = 'http://127.0.0.1:7890' | |
# temporary | |
$env:HTTP_PROXY = $proxy | |
$env:HTTPS_PROXY = $proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ALTER TABLE MD_CustomerGroupSheet ADD IsPushed BIT | |
if exists(select 1 from sys.extended_properties p where | |
p.major_id = object_id('MD_CustomerGroupSheet') | |
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'IsPushed') | |
) | |
begin | |
execute sp_dropextendedproperty 'MS_Description', | |
'user', 'dbo', 'table', 'MD_CustomerGroupSheet', 'column', 'IsPushed' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sortDate(a,b){ | |
return new Date(a)-new Date(b); | |
} | |
items.sort(sortDate).map(function(a,b){return a.time}) |