When does a commit in SQLAlchemy Core get pushed to disk?

289
May 31, 2017, at 1:06 PM

I have a program that is using SQLAlchemy Core to push information to an SQLite database. I am not using auto-commit transactions and am instead controlling the rate at which commits are made, as follows:

engine = create_engine("database")
connection = engine.connect()
transaction = connection.begin()
for index in range(0, num):
    connection.execute(EXAMPLE_INSERT)
transaction.commit()

Once I am done I am checking the database modify time so that I can check later to see if the database has been modified, which I am fetching using the following:

time.ctime(os.path.getmtime(full_path))

The issue that is occurring is that the database on disk seems to be getting modified after I am done with all the transactions and commits, which leads me to believe that the push to disk is occurring in some other process at some time later than the commit.

So is this correct, and if so, is there anyway to know when all the changes have been pushed to disk so I can get the correct modify time?

Rent Charter Buses Company
READ ALSO
PySide2 on windows

PySide2 on windows

Does anyone know where I can find a pip-install for PySide2?

688
Unabe to loop over files with Python

Unabe to loop over files with Python

I have a folder with 40 files in it which I want to loop throughWhen I print out the name of the file my code works fine:

402
Twilio <Gather> Speech Recognition support in twilio python package

Twilio <Gather> Speech Recognition support in twilio python package

Need some help in TwilioTwilio Gather verb supports input="speech" which recognizes speech as mentioned in their site

408
AttributeError: Rectangle instance has no attribute &#39;y&#39;

AttributeError: Rectangle instance has no attribute 'y'

I am coding a program in which a user draws a rectangle, and then the perimeter and area are calculatedIn finding the lengths of two sides, I get an AttributeError: Rectangle instance has no attribute 'y'

370