1080p migration tweak #639

Merged
merged 2 commits into from Mar 30, 2013

Projects

None yet

3 participants

@thezoggy
Contributor
  • Add some logging to each 1080p migration part so people see some sort of progress in their console
  • Use show_id instead of tvdb_id for first part of migration, just in case there is a duplicate id or if show is missing tvdbid (never know)
  • Optimize query by reducing the arithmetic performed each time and queuing the list of updates to perform using a transaction (thanks @Prinz23)
Prinz23 commented Mar 27, 2013

BEGIN/END TRANSACTION won't work correctly with sqlite3 python.

I use a mass_action funtcion (added to db.py) in my timezone coming episodes pull to fill the network table with all info i a second or so...

Prinz23 commented Mar 28, 2013

My mass_action function does nothing else as use a transaction to execute any amount of sql queues

I just updated a fix for the function in the timezone pull request.

It's easy to use and to convert old calls to the action function to use this function. You just call that function with a python list with all the sql queues and the function executes it as one transaction. It's really fast in comparison.

Contributor

your mass_action function did exactly what i wanted and deff was a speed improvement. I've now included it as part of this pull. only using it for just this 1080p migration for right now..

@thezoggy thezoggy Add some logging to each 1080p migration part so people see some sort…
… of progress in their console

Use show_id instead of tvdb_id for first part of migration, just in case there is a duplicate id or if show is missing tvdbid (never know)
Optimize query by reducing the arithmetic performed each time and queuing the list of updates to perform using a transaction (thanks @Prinz23)
c3b8528
Prinz23 commented Mar 29, 2013

I improved the speed of the mass_action a bit for systems with low IO disk performance

@thezoggy thezoggy Tweaked mass_action function so that we can log the individual querie…
…s if we wanted, by default we only log the amount of queries when completed. Should help with low powered devices when trying to do the work and log the work would cause some thrashing on the hdd.
91c428a
@midgetspy midgetspy merged commit fb37d33 into midgetspy:development Mar 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment