vinyl_v1's Issues
Pool Connection Failed
Hi there. I've finally gotten my scraping script to work, but the problem now is that I am getting the following errors.
WARNING | 2022-09-05 20:21:00 | MainThread | psycopg.pool._add_connection.422 | error connecting in 'pool-24': connection failed: FATAL: remaining connection slots are reserved for non-replication superuser connections
Obviously I have too many connections, and the previous connections that had been negotiated with the server are not being properly reused if that is even supposed to happen.
Any ideas ? Is it just a matter of optimising the postgres settings ?
Thanks
pk missing during record creation
Hi there, me again. I'm getting the following error when trying to create a record on the DB.The pk is normally assigned when the record is committed/saved, so I'm not really sure what is going on here. The command causing the problem is called as follows
await TableUpdateDate.vinyl.create(
company = company,
datatable=table,
date=datetime.now()
)
and a little bit later I get the following error.
await obj.insert(using=self.db)
File "/venv/lib/python3.10/site-packages/vinyl/saving.py", line 51, in insert
self._prepare_related_fields_for_save(operation_name="save")
File "/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1095, in _prepare_related_fields_for_save
if obj.pk is None:
AttributeError: 'coroutine' object has no attribute 'pk'
sys:1: RuntimeWarning: coroutine 'VinylQuerySet.get_or_none' was never awaited
Ideas ?
del kwargs['password']
Hej! I need to comment out this line as per your wtf? comment otherwise there is no password sent to the DB for authentication. Any reason why you chose to put that in ?
Not all statements did execute
Hi there - I have been receiving this statement after attempting to write records to the DB i.e. "Not all statements did execute" from the deferred.py file. Would you be able to expand on that a bit ? Which statements exactly ? Are some of the records that should have been written to the DB not being written ?
Thanks
Use `make_conninfo()` to compose connection strings
This code doesn't work if the connection string items contain weird chars. Please use make_conninfo()
.
Doesn't this always return True?
assert Model error
File "/$HOME/venv/lib/python3.10/site-packages/vinyl/queryset.py", line 67, in __init__
assert model
AssertionError
Hi there! Many thanks for putting in all the effort writing this library. I am trying to test it on the little Django project that I am busy with, but keep getting this AssertionError. Obvisouly the model is not making its way to the queryset init method. I have registered the custom manager as vinyl = VinylManager()
under each model, and have registered the backend. I hope that I have done everything I need to, but as it is not working I'm sure something is missing or my understanding is lacking. Would you be able to shed any light? What is it that I am not understanding? Thanks!
Make the pool size configurable
What is the point of a connection pool with exactly one connection? You are effectively serializing all the requests, and might even create a deadlock if two connections are requested at the same time.
Maybe min_size=1, max_size=4 is a better default, however I would leave these entries configurable.
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.