Comments (3)
Hi, I'm not sure, is there a chance you could share code snippet that is causing this issue? Then I'd be able to investigate Thanks!
from tardis-python.
Sorry for the delayed response:
Here's a snippet of the code:
async def replay(from_date: str, to_date: str):
tardis_client = TardisClient(api_key="API KEY HERE", cache_dir="/data/backups/tardis-cache-dir", http_timeout=360)
messages = tardis_client.replay(
exchange="deribit",
from_date=from_date,
to_date=to_date,
filters=[
Channel(name="trades", symbols=[]),
Channel(name="book", symbols=[]),
],
)
# Some file operations happen here
async for local_timestamp, message in messages:
f.write(f"{int(local_timestamp.timestamp() * 10**9)}," + json.dumps(message).replace(' ', '') + '\n')
f.close()
from tardis-python.
Can you try replacing file operations with async versions, for example https://github.com/Tinche/aiofiles ? It could be that writing to files is blocking Python's event loop that is used under the hood to get the data for replay and that is causing connection errors (as CPU is busy writing to file so data from network is not read, causing connection reset).
Please also clear local .tardis-cache just in case.
from tardis-python.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tardis-python.