refactor: Time Master#801
Merged
alvinhui merged 15 commits intorelease/0.18.0from Mar 4, 2021
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## release/0.18.0 #801 +/- ##
===============================================
Coverage 57.14% 57.14%
===============================================
Files 1 1
Lines 70 70
Branches 15 15
===============================================
Hits 40 40
Misses 30 30 Continue to review full report at Codecov.
|
fyangstudio
reviewed
Mar 4, 2021
| try { | ||
| await checkMidnight(); | ||
| await Promise.all([saveDataToDisk(data), appendDataToPayload(data)]); | ||
| } finally { |
Contributor
Author
There was a problem hiding this comment.
这里不 catch 错误,是有意为之。
| import { storagePath as iceworksStoragePath } from '@iceworks/storage'; | ||
| import { getDataFromSettingJson } from '@iceworks/common-service'; | ||
| import { getNowDay } from './time'; | ||
| import { getNowDay } from './day'; |
Collaborator
There was a problem hiding this comment.
day 和 time 拆开以后,time 的定位不太明确了
Contributor
Author
There was a problem hiding this comment.
day 是同步当前日期,time 是时间的工具类
| const { storagePath } = require('@iceworks/storage'); | ||
| const FileTransport = require('./fileTransport'); | ||
|
|
||
| function getLogger(namespace) { |
Collaborator
There was a problem hiding this comment.
createLogger 或者 直接 Logger 好一些?
fyangstudio
reviewed
Mar 4, 2021
| return day; | ||
| } | ||
|
|
||
| export function checkIsNewDay() { |
fyangstudio
approved these changes
Mar 4, 2021
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@iceworks/storage: 导出 storagePath CHANGLOG@iceworks/logger: 新增该包,将日志落盘initViews方法,用于初始化视窗,并将视窗相关的方法都移动到views/index.ts@iceworks/logger写日志utils/day,用于同步当前日期信息