Skip to content

Commit

Permalink
feat: add exception raise when error occured
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddd13 committed Oct 13, 2024
1 parent fcc7e2b commit 80ec46c
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 1 deletion.
85 changes: 85 additions & 0 deletions e -i HEAD~3
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
ccbf2e0 (HEAD -> main, origin/main) fix: github action bool secrect settings not worked (bool('0') always get true)
8e7a129 fix: github action bool secrect settings not worked (bool('0') always get true)
ccda50c fix: github action bool secrect settings not worked (bool('0') always get true)
35a7086 fix: change free-only from false to none to get full sheets including freesheets
2ecac55 Update last success time
b26561d Update last success time
6dded4a Update last success time
1cfce96 Update last success time
19b0a22 Update last success time
fe4ff4d Update last success time
70b9715 Update last success time
4e2c494 Update last success time
6b72972 Update last success time
11b4ea6 Update last success time
bd5b498 Update last success time
bef0e5f Update last success time
60aa273 Update last success time
e000232 Update last success time
8c15b86 Update last success time
a7c215d (tag: 0.0.6) Update last success time
e358f82 docs: update README.md
81f3046 docs: update README.md
d220da6 docs: update README.md
0f24a77 fix: add missing env trans for gh action in auto_download.yml
da0da0f docs: update README.md
982723c feat: support outlook oauth
6095aa5 test: save to repo ok
ac62347 test: save to repo ok
22aa21d debug: test save to repo
caf03f5 debug: test save to repo
6df718e debug: test save to repo
4f60876 chore: remove test file
61d9d31 chore: add force push
85df7b1 chore: fix readme table
2cbc669 chore: fix readme table
a9f1b33 chore: change dockerhub repo
45f9d56 feat: replace rsshub by directly querying sheets from mms
dbda871 Update last success time
c48143c Update last success time
d696389 update new token after setting MFA
4858b9b Update last success time
59d1f39 Update _last_download_signal
ecebb8a Update onedrive.py
3719fc8 Update last success time
2c8bef1 Update last success time
20dc191 Update README.md
9ace417 Update last success time
7949d75 Update README.md
7ac11dd (tag: 0.0.3) Update last success time
4d03216 fix: add the missing makedir of local folder
1fe9168 fix: add the missing makedir of local folder
b065e7b feat: support onedrive
71cef13 feat: rewrite main code, support any user of mms
f215d53 feat: rewrite main code, support any user of mms
bd28ab0 feat: rewrite main code, support any user of mms
847004f feat: rewrite main code, support any user of mms
f70f50e feat: rewrite main code, support any user of mms
3e40da5 feat: rewrite main code, support any user of mms
7bfcf35 Update last success time
5f68b19 Update README.md
ab5aa7a Update last success time
a497e35 Update README.md
a6fddb8 Update last success time
e948cb1 Update README.md
cc8a8c4 Update README.md
1d45749 Update last success time
dd81371 docs: update README.md
3836fb1 (tag: 0.0.2) Merge branch 'main' of github.com:Freddd13/Auto-Halcyon
eb1481e fix: fatal safety problem of packing private data to docker
b4b6682 Update last success time
58ad838 docs: update README.md
e8a21a8 feat: support closing email notification
9c4d100 refactor: remove github api
8efe1ed feat: add workflow_dispatch
c4c91d7 feat: use action to auto publish docker
6363dd7 docs: update README.md
86d35f0 feat: support docker
d7312e0 fix: wrong attr of latest time for gh api
b7c7e79 debugging: github action
d20c707 debugging: github action
7436eb1 debugging: github action
e78e12f fix: last time not return bug - readline bug - docker/local not loading config and last time bug
4b28732 refactor: using strategies to deal with docker, action and local
bb953a5 chore: rebase history commits
f128834 first commit
9 changes: 8 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ def collect_errors(err):
logger.info("Update last download signal successfully.")

## 7. send email
has_error_prefix = "[ERROR] " if len(ERROR_MSGS) > 0 else ""
if strategy.enable_email_notify:
### check result and prepare mail data
logger.info("=" * 50)
logger.info("summary: ")
has_error_prefix = "[ERROR] " if len(ERROR_MSGS) > 0 else ""
if all_tasks_success:
if num_newly_downloads > 0:
subject = f"{has_error_prefix}Successfully downloading sheets."
Expand Down Expand Up @@ -238,3 +238,10 @@ def collect_errors(err):
),
):
os._exit(-1)
else:
logger.info("Skip sending email.")
if has_error_prefix:
logger.error(
"ERROR msgs: \n{}".format("\n".join([err for err in ERROR_MSGS]))
)
raise Exception("Error occurred, please check log.")

0 comments on commit 80ec46c

Please sign in to comment.