Skip to content

Commit

Permalink
Merge pull request #22 from oda-hub/less-logging-errors
Browse files Browse the repository at this point in the history
less logging errors
  • Loading branch information
volodymyrss authored Dec 23, 2022
2 parents 37a966e + 61709dd commit e61dc1f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/prose.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
name: Prose Linting
on: [push]

name: Spellcheck
on: push

jobs:
prose:
build:
name: Spellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Vale
uses: errata-ai/[email protected]
- uses: actions/checkout@master
- uses: rojopolis/[email protected]
name: Spellcheck
with:
# Optional
styles: |
https://github.com/errata-ai/Microsoft/releases/latest/download/Microsoft.zip
https://github.com/errata-ai/write-good/releases/latest/download/write-good.zip
# Optional
config: https://raw.githubusercontent.com/errata-ai/vale/master/.vale.ini

# Optional
files: '["README.md"]'
env:
# Required
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
source_files: README.md
task_name: Markdown
output_file: spellcheck-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ def _run(self, data_server_url, param_dict):
t0_isot=param_dict['t0_isot'],
dt_s=param_dict['dt_s'],
)
logger.error('calling GET on %s', url)
logger.debug('calling GET on %s', url)
res = requests.get("%s" % (url), params=param_dict)

if len(res.content) < 8000: # typical length to avoid searching in long strings, which can not be errors of this kind
if 'this service are limited' in res.text or 'Over revolution' in res.text:
raise SpiacsAnalysisException(f"SPI-ACS backend refuses to process this request, due to resource constrain: {res.text}")

logger.error('data server returned %s of len %s text: %s...', res, len(res.content), res.text[:500])
logger.debug('data server returned %s of len %s text: %s...', res, len(res.content), res.text[:500])

except ConnectionError as e:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def build_from_res(cls,
lc_list.append(lc)

except Exception as e:
logger.error(traceback.format_exc())
logger.info(traceback.format_exc())

raise SpiacsAnalysisException(
message='spiacs light curve failed: %s' % e.__repr__(), debug_message=str(e))
Expand Down

0 comments on commit e61dc1f

Please sign in to comment.