Commit graph

3398 commits

Author SHA1 Message Date
Lance Edgar 4c602dc87e Fix config bug for recording changes in rattail db
Was turning ON the flag if the setting name was present at all.  Now we
interpret the setting value as a boolean instead.
2016-04-05 21:04:18 -05:00
Lance Edgar 8c662831bf Update changelog 2016-04-05 13:12:56 -05:00
Lance Edgar fa745e1a29 Fix rattail importer bugs, when updating local instance
Must track the instance returned by that method now.
2016-04-05 11:12:17 -05:00
Lance Edgar 374756dfa2 Add Importer.get_single_instance() for easier customization
That way `get_instance()` can keep checking the cache, then fallback to
this new method.
2016-03-24 21:37:08 -05:00
Lance Edgar 84ef87d183 Add deletion support to importer-based datasync 2016-03-23 23:59:10 -05:00
Lance Edgar 50c3c3c27f Add handler convenience when defining importers for datasync consumer 2016-03-23 23:59:10 -05:00
Lance Edgar b2581bcf00 Skip change if host instance not found, in importer-based datasync 2016-03-23 23:59:10 -05:00
Lance Edgar a8386400bb Add mechanism to record changes only for sessions on certain engines
Finally!
2016-03-23 23:59:10 -05:00
Lance Edgar 80f7caf3a5 Remove some unwanted logging noise 2016-03-23 23:59:07 -05:00
Lance Edgar 41d4c20348 Tweak unicode rendering of User objects 2016-03-23 23:52:09 -05:00
Lance Edgar f184f7f30f Add host session to main transaction, when importing from SQLAlchemy
Not really the same transaction, but you get the idea.
2016-03-23 23:50:58 -05:00
Lance Edgar 80ceb09b60 Fix bug in User model importer 2016-03-23 23:49:45 -05:00
Lance Edgar db4708962a Tweak logging when recording a data change 2016-03-22 17:54:02 -05:00
Lance Edgar 509014826f Make a copy of the RecordRenderer class for new importer framework
I'm still not so sure about this whole 'record renderer' concept, but
for now at least wanted to stop relying on the old 'importing' package.
Still have one place left, the 'import-csv' command...
2016-03-21 15:21:12 -05:00
Lance Edgar f7fa9a812b Add new importer-based datasync consumer class
Yay, I'm really hoping this simplifies things going forward.  Ideally
one should only have to define the real data mapping logic once, in the
importer.  The datasync consumer should then lean on that "entirely".
2016-03-21 15:15:50 -05:00
Lance Edgar d734f658e2 Improve the core importer class to better allow non-SQLAlchemy targets
I.e. stop forcing the 'local' data update process to use the Rattail
session, etc.  This commit also improves the default progress message.
2016-03-21 15:14:39 -05:00
Lance Edgar 281f33990f Tweak import warnings email template
Improve some styles, and embed the actual host and local title strings
in the summary paragraph.
2016-03-21 15:12:10 -05:00
Lance Edgar 951615ebcf Tweak some logging when basic changes are recorded
Hoping this makes the logs prettier to look at etc.
2016-03-21 15:11:05 -05:00
Lance Edgar 8f2f96fbd1 Tweak some logging when an import command begins 2016-03-21 15:09:36 -05:00
Lance Edgar f63f6f5e2e Add 'humanize' to dependency list 2016-03-19 18:59:04 -05:00
Lance Edgar afd56d074e Tweak importer logging and warning email template, to add more info 2016-03-19 18:20:14 -05:00
Lance Edgar 5970f06684 Tweak some column header labels on the import warning email diff tables 2016-03-19 12:12:43 -05:00
Lance Edgar 1ac97fb3b8 Update changelog. 2016-03-11 17:22:34 -06:00
Lance Edgar 1b84b90f7e Tweak default import warning email template, ever so slightly. 2016-03-11 17:21:26 -06:00
Lance Edgar 5d3b002ebf Fix cmp(GPC) behavior when other is None etc. 2016-03-11 15:05:02 -06:00
Lance Edgar e8774280d7 Update changelog. 2016-02-27 18:53:45 -06:00
Lance Edgar 5b163c024f Add initial color-coded diffs to data import warning emails. 2016-02-27 18:51:57 -06:00
Lance Edgar b392d9020b Fix bug with importing of customer first/last name. 2016-02-27 18:51:28 -06:00
Lance Edgar a92511b015 Tweak unicode(Employee) output.
Still need to figure out a "best practices" approach here...
2016-02-27 18:50:36 -06:00
Lance Edgar c010c4c4fe Update changelog. 2016-02-27 14:02:49 -06:00
Lance Edgar cf0308fc3e Add date_argument back to rattail.commands root. 2016-02-27 14:01:51 -06:00
Lance Edgar 26d9e26ac8 Tweak changelog. 2016-02-27 13:08:43 -06:00
Lance Edgar b5d7ba1fe7 Update changelog. 2016-02-27 13:05:54 -06:00
Lance Edgar 6d608f0eaa Tweak logging wording when datasync threads die from error. 2016-02-27 11:43:21 -06:00
Lance Edgar 352d168687 Fix some tests. 2016-02-27 11:05:34 -06:00
Lance Edgar 71dabe761e Add Dump command back to main module..for now. 2016-02-16 11:54:05 -06:00
Lance Edgar 1d80477c42 Add ImportSubcommand back to rattail.commands root. 2016-02-15 12:55:58 -06:00
Lance Edgar db66d25b34 Make 'commands' subpackage, add 'rattail-dev' command.
And add subcommand for 'rattail-dev new-batch'.  Hopefully this is all a
good idea, pretty rough draft at this point.
2016-02-15 00:30:04 -06:00
Lance Edgar d3c2744193 Tweak repr(BatchMixin) output.
Not real sure why, just felt like it I guess.
2016-02-14 16:29:53 -06:00
Lance Edgar f7d18987ee Update changelog. 2016-02-11 21:20:30 -06:00
Lance Edgar 98da38980e Tweak some wording on data import warnings email template. 2016-02-11 21:19:12 -06:00
Lance Edgar 7adcdba3f3 Make sure message recipients are unique. 2016-02-11 18:48:41 -06:00
Lance Edgar a93045c74c Update changelog. 2016-02-10 15:20:03 -06:00
Lance Edgar eda662ae6f Tweak logging, warning template for new data importers.
This hopefully makes things clearer, since we now have so many of these
things in so many directions...
2016-02-10 15:18:37 -06:00
Lance Edgar a5fdaf6d44 Update changelog. 2016-02-08 19:44:27 -06:00
Lance Edgar 49bd4b7c40 Make config object's db session somewhat configurable.
This is for the sake of Tailbone, so it can leverage its scoped sessions
instead of creating a bunch of new ones and exhausting the pool...
2016-02-08 19:42:44 -06:00
Lance Edgar 7ceee98d46 Update changelog. 2016-02-08 15:36:37 -06:00
Lance Edgar ae33303d89 Fix bug in Rattail->Rattail import handler. 2016-02-08 15:35:56 -06:00
Lance Edgar b84c4c0c39 Update changelog. 2016-02-08 14:32:02 -06:00
Lance Edgar 7d5a8e1a3d Tweak "import changes" email warnings, so deleted instances are in context. 2016-02-08 14:25:19 -06:00