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

cc.close() function in finally block #405

Open
Mengflz opened this issue May 29, 2023 · 1 comment
Open

cc.close() function in finally block #405

Mengflz opened this issue May 29, 2023 · 1 comment

Comments

@Mengflz
Copy link

Mengflz commented May 29, 2023

When I use the forager.py, I find the script will end after running it for an hour.
I checked the code. It seems the cc.close() is put in finally block. So the instance will be closed in the second time unless the output of the first run.
I think may be you could think of move the cc instance into the loop? Or move the cc.close() to the except block. But in the later situation, I found it need some extra ways to catch the KeyBoardInterrupt Exception.

@enarjord
Copy link
Owner

Good catch sir. You are right on every account. Just pushed a commit where the ccxt instance is moved to inside the loop.

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

No branches or pull requests

2 participants