Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cron job functionality and error logging enhancements #124

Merged
merged 5 commits into from
Dec 30, 2023
Merged

Conversation

alexandersazonof
Copy link
Member

The implementation of the 'node-cron' library has been added to package.json to provide cron job functionality. This supports scheduling periodic tasks such as daily task reports. Error logging has been enhanced within scripts/rebalance.ts, converting direct messaging to a cumulative log recording and event generation system. This results in clearer and more manageable error tracking and reporting. License data in the package-lock.json has also been modified.

The implementation of the 'node-cron' library has been added to package.json to provide cron job functionality. This supports scheduling periodic tasks such as daily task reports. Error logging has been enhanced within scripts/rebalance.ts, converting direct messaging to a cumulative log recording and event generation system. This results in clearer and more manageable error tracking and reporting. License data in the package-lock.json has also been modified.
The updated code introduces the use of 'node-cron' library for task scheduling. It also includes significant enhancements to the error logging mechanism in scripts/rebalance.ts, replacing direct messaging with a cumulated log and event recording system. This alteration provides more structured and accessible oversight of error events.
The default time for the cronDailyReport has been modified. Additionally, the error handling logic within scripts/rebalance.ts has been significantly refactored for simplification and improvement. The EthersError interface was removed and the functionality of logErrorEvent was merged into logEvent, making error handling more streamlined and less cluttered.
The default value for the isError parameter in the logEvent function within scripts/rebalance.ts has been changed from true to false. This might help suppressing unwanted error messages unless they are specifically invoked.
Added a new environmental variable, TETU_EXCLUDE_ERROR_LOGS, to adjuster rebalance script error logs. Also, modified the logEvent function to prevent default error messaging. This update provides more control on error log generation and helps to avoid unnecessary noise in logs.
@belbix belbix merged commit 53835c9 into master Dec 30, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants