-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix retry remove callback move to wrapper
- Loading branch information
1 parent
2736452
commit a30b5d9
Showing
4 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import arrow | ||
def retry_callback(ctx, param, value): | ||
params = ctx.params | ||
if value: | ||
params["force_all"] = True | ||
params["after"] = arrow.get(2000) | ||
params["no_api_cache"]=True | ||
def retry_modifiy(ctx): | ||
# Modify the URL based on certain conditions or ctx values | ||
if ctx.params['redownload']: | ||
ctx.params["force_all"] = True | ||
ctx.params["after"] = arrow.get(2000) | ||
ctx.params["no_api_cache"]=True | ||
return ctx |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import cloup as click | ||
|
||
from ofscraper.utils.args.parse.group_bundles.metadata import metadata_args | ||
import ofscraper.utils.args.parse.arguments.utils.retry as retry_helper | ||
|
||
|
||
@metadata_args | ||
@click.pass_context | ||
def metadata(ctx, *args, **kwargs): | ||
ctx=retry_helper.retry_modifiy(ctx) | ||
return ctx.params, ctx.info_name |