dsh-qianchuan-toolkit 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
File without changes
|
|
@@ -124,8 +124,13 @@ export function groupByAccount(cfg) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export function appendJsonl(file, obj) {
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
// 埋点写失败不能打断巡航:只告警,不抛出
|
|
128
|
+
try {
|
|
129
|
+
fs.mkdirSync(path.dirname(file), { recursive: true })
|
|
130
|
+
fs.appendFileSync(file, JSON.stringify(obj) + '\n')
|
|
131
|
+
} catch (e) {
|
|
132
|
+
console.error('埋点写入失败(已忽略):' + file + ' — ' + e.message)
|
|
133
|
+
}
|
|
129
134
|
}
|
|
130
135
|
|
|
131
136
|
/** 判定:一个抖音号当前小时的聚合 */
|
|
File without changes
|