Skip to content

Commit

Permalink
Set decimal context on run command only (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout authored Jul 20, 2021
1 parent 9f06b66 commit 94c4c7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ replace = version = "{new_version}"
[bumpversion:file:src/dipdup/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bumpversion:glob:src/*/docker/Dockerfile]
search = FROM dipdup/dipdup:{current_version}
replace = FROM dipdup/dipdup:{new_version}
3 changes: 1 addition & 2 deletions src/dipdup/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ async def cli(ctx, config: List[str], env_file: List[str], logging_config: str):
integrations=[AioHttpIntegration()],
)

set_decimal_context(_config.package)

ctx.obj = CLIContext(
config_paths=config,
config=_config,
Expand All @@ -81,6 +79,7 @@ async def cli(ctx, config: List[str], env_file: List[str], logging_config: str):
async def run(ctx, reindex: bool, oneshot: bool) -> None:
config: DipDupConfig = ctx.obj.config
config.initialize()
set_decimal_context(config.package)
dipdup = DipDup(config)
await dipdup.run(reindex, oneshot)

Expand Down

0 comments on commit 94c4c7a

Please sign in to comment.