Commit graph

3398 commits

Author SHA1 Message Date
Lance Edgar a648c74e24 Update changelog 2016-05-05 16:28:40 -05:00
Lance Edgar 9cb7ff9068 Make 'tests' a proper subpackage again; add some tests
Trying to make more of an effort here...
2016-05-04 16:30:27 -05:00
Lance Edgar 17bdc68680 Refactor scheduled/worked shift models to share some logic 2016-05-03 21:20:23 -05:00
Lance Edgar 1bed40151d Update changelog 2016-05-03 14:42:21 -05:00
Lance Edgar 457d20862c Fix bug in format_phone_number() function
Need to always return the original if we can't format it.
2016-05-03 14:40:53 -05:00
Lance Edgar f639ff2a7d Update changelog 2016-05-03 10:46:14 -05:00
Lance Edgar 9a26fc0324 Refactor where phone number normalization logic lives
Just so that can be shared more easily.
2016-05-03 10:43:28 -05:00
Lance Edgar 296a96be69 Add --timeout arg support to datasync wait command
Hopefully this works right, we'll see.
2016-05-02 16:57:07 -05:00
Lance Edgar 5a4a86d8f7 Fix line endings for email templates
Er, I guess...
2016-05-02 16:56:44 -05:00
Lance Edgar e3a3361f02 Update changelog 2016-05-02 15:19:17 -05:00
Lance Edgar 038263af98 Add support for 'normalized_number' field in phone importer
Sometimes we have to use this number as part of the import key.
2016-05-02 13:46:23 -05:00
Lance Edgar 4ea53b3b27 Rename ImportSubcommand => OldImportSubcommand
Once that propagates to all projects, we can reclaim `ImportSubcommand`
for the new command.
2016-05-02 12:55:54 -05:00
Lance Edgar 50eab3eac7 Add .gitattributes file to enforce DOS line endings for mail templates 2016-05-01 20:38:00 -05:00
Lance Edgar 63d05dbaf0 Add basic user feedback email template 2016-05-01 20:36:17 -05:00
Lance Edgar 7574134ddf Update changelog 2016-04-29 15:40:56 -05:00
Lance Edgar f7884ab76d Add empty Watcher.process_changes() method for datasync
Just to avoid having to provide that when "consuming self" but not
actually doing anything.
2016-04-29 15:01:15 -05:00
Lance Edgar c12f5ed344 Update changelog 2016-04-28 18:34:18 -05:00
Lance Edgar 6ae5bd11f0 Add ScheduledShift model to schema
Also add some convenience methods to `WorkedShift`, for time sheet display.
2016-04-28 18:13:54 -05:00
Lance Edgar 7883fe1d5e Add time.get_sunday() convenience function 2016-04-28 18:12:28 -05:00
Lance Edgar d805698af0 Add RattailConfig.workdir() convenience method 2016-04-28 18:10:23 -05:00
Lance Edgar 4a72bf6927 Update changelog 2016-04-26 14:29:43 -05:00
Lance Edgar 17eebdee7d Tweak default behavior for importer-based datasync consumer
Add `host_object` kwarg to `process_change()` method; make that and the
`invoke_importer()` method return the (final) local object where
relevant/possible.
2016-04-26 14:27:22 -05:00
Lance Edgar ad9ef92b9e Update changelog 2016-04-26 12:59:50 -05:00
Lance Edgar 8bf65d286d Tweak when we add new data instance to session, to avoid premature flushes 2016-04-26 12:58:42 -05:00
Lance Edgar 9db47cc5b0 Update changelog 2016-04-25 19:48:01 -05:00
Lance Edgar f528e871b1 Add bulk Rattail importer, plus various tweaks
Tweaks are mostly for the sake of a `host_session`, if one is involved.
2016-04-25 19:39:03 -05:00
Lance Edgar d4707a80cc Add WorkedShift data model to schema, importer 2016-04-25 19:37:59 -05:00
Lance Edgar 176fb8e4c1 Update changelog 2016-04-24 17:29:44 -05:00
Lance Edgar 3459876c00 Add invoke_importer() method to datasync import consumers
Also tweak `process_change()` to allow caller to specify host data.
2016-04-23 20:11:35 -05:00
Lance Edgar 0099e54bc1 Fix setup bug in bulk Postgres importer 2016-04-23 16:00:13 -05:00
Lance Edgar cc5840deb4 Add initial begin/rollback/commit abstraction to import handlers
Hopefully lets each handler define local/host behavior as needed.
2016-04-22 18:35:02 -05:00
Lance Edgar 8adc8caf4e Alter make_utc() function to allow returning zone-aware time 2016-04-22 17:20:27 -05:00
Lance Edgar 82c3e173bb Add data kwarg to Importer.cache_instance_data() method
This was needed for a POS transaction importer, so it could auto-filter
local data based on date range which was derived from host data.
2016-04-21 22:39:55 -05:00
Lance Edgar 5c28719f8b Provide method by which importers may prevent create/update/delete
One needn't pass flags on command line to invoke default behavior.
2016-04-21 22:38:49 -05:00
Lance Edgar 295f2d53c4 Add multi-batch change transaction support for datasync consumers
Otherwise it was possible for the rattail transaction to fall out of
sync from consumer, if it was committing more often than us.
2016-04-21 19:26:28 -05:00
Lance Edgar d7cb42a98b Add RattailConfig.production() method
Convenience to differentiate when running in production mode.
2016-04-21 17:51:39 -05:00
Lance Edgar 5db81bfe79 Add --start-date and --end-date args to importer command
Also stash the args in the importer, so extra args are always available.
2016-04-21 17:36:47 -05:00
Lance Edgar a3c4921270 Add base importer and handler for PostgreSQL "bulk copy" importing 2016-04-21 13:41:43 -05:00
Lance Edgar 739629eab9 Add model_mapper and model_table attributes to base importer class 2016-04-21 13:41:37 -05:00
Lance Edgar 2cfa543e05 Add Consumer.setup() method for datasync 2016-04-21 13:33:22 -05:00
Lance Edgar 01357e7164 Stop assuming handler will return changes from import 2016-04-21 13:33:01 -05:00
Lance Edgar 3564178d8d Add config.parse_bool() function
For those generic needs...
2016-04-21 13:32:17 -05:00
Lance Edgar 9ff8f9ca11 Skip data sync for "empty" host record, in importer-based consumers
I.e. if the importer normalizes the host record to `None`, there is no
need to sync to the local system.
2016-04-18 09:52:59 -05:00
Lance Edgar 9d72f723e8 Add Watcher.setup() method for datasync 2016-04-18 09:49:15 -05:00
Lance Edgar 9c487a7a33 Add add_mail_alias() fabric function 2016-04-14 17:19:34 -05:00
Lance Edgar 5b0dfd2ee8 Update changelog 2016-04-12 14:27:24 -05:00
Lance Edgar 1ef8f1ec7c Fix bug where usedb flag wasn't being set from make_config()
Whatever was in the config file would override what was passed in.
2016-04-07 00:11:48 -05:00
Lance Edgar c4be67d6bf Update changelog 2016-04-06 11:45:44 -05:00
Lance Edgar c0a302b112 Fix bug in ProductCode importer when new records are created
Seems like this still could be better somehow...
2016-04-06 11:41:59 -05:00
Lance Edgar b6b41fcb9d Update changelog 2016-04-05 22:16:24 -05:00