Commit graph

3860 commits

Author SHA1 Message Date
Lance Edgar
c0ea6f304a Let config know if/when versioning has been enabled
and check that when running `rattail import-versions` command
2021-12-11 15:40:17 -06:00
Lance Edgar
051e79318f Update changelog 2021-12-11 15:00:31 -06:00
Lance Edgar
931a3fda45 Let progress be passed in late, when running problem report 2021-12-11 13:59:27 -06:00
Lance Edgar
85aa75644f Allow running a problem report just to get results, but avoid email 2021-12-11 13:54:57 -06:00
Lance Edgar
c1ad5d4bca Fix calculation of seconds since last run for datasync watcher
in my dev setup i was getting "OK" status for watchers dead for
days..turns out `timedelta.seconds` was not enough to check for, on
account of there also being `timedelta.days`
2021-12-11 11:41:07 -06:00
Lance Edgar
1a1086b68d Update changelog 2021-12-09 12:13:06 -06:00
Lance Edgar
f6c4859c48 Add default logic for purchase batch make_row_from_po_item() 2021-12-08 21:57:46 -06:00
Lance Edgar
8f4ecdd362 Add some purchase order abstractions to purchase batch handler 2021-12-08 20:25:33 -06:00
Lance Edgar
a2ef81f5a1 Update changelog 2021-12-08 15:53:02 -06:00
Lance Edgar
96b0841536 Add pre_process_changes() and post_process_changes() for datasync 2021-12-08 15:44:40 -06:00
Lance Edgar
d1aebbf76a Use python's importlib instead of doing our own thing
at least, where possible.  hoping this fixes some recently-noticed
"quirks" where the module doesn't appear fully loaded
2021-12-07 19:56:03 -06:00
Lance Edgar
dd9708c79a Add get_problem_report_handler() method to AppHandler
and other related tweaks for sake of exposing these in web app
2021-12-07 17:44:52 -06:00
Lance Edgar
f59611a2fc Update changelog 2021-12-07 13:18:20 -06:00
Lance Edgar
611489fe59 Set the model attr when making new AppHandler object
or at least try, and ignore errors, which will likely happen if
e.g. the DB layer is not installed
2021-12-07 13:11:52 -06:00
Lance Edgar
bc3b9ea2f8 Bugfix 2021-12-07 12:09:13 -06:00
Lance Edgar
54d96fb3dc Update changelog 2021-12-07 11:34:47 -06:00
Lance Edgar
ebba1c0c29 Make config object required, for Report constructor 2021-12-07 11:25:21 -06:00
Lance Edgar
570743f072 Add get_active_stores() method for app handler 2021-12-07 11:24:57 -06:00
Lance Edgar
3d4bd0c5c0 Mark only certain handlers as being safe for web app
until the web tool is more robust, then can mark more as it improves
2021-12-06 21:25:48 -06:00
Lance Edgar
b639ce7e43 Fix some tests 2021-12-06 21:15:45 -06:00
Lance Edgar
369451c7c4 OMG a ridiculous commit to overhaul import handler config etc.
- add `AppHandler.get_designated_import_handlers()` and friends
- exit w/ code 1 when command line makes no sense and must print help
- register all core import/export handlers via setup.py and config
- use "handler key" lookup for all core import/export commands
- stop displaying model list in help for import/export command
- migrate datasync "change" permissions, per tailbone changes
- log warning w/ traceback if loading entry point fails
2021-12-06 19:59:31 -06:00
Lance Edgar
2648f25c14 Add some methods/attrs to import handlers, for exposing in web app
not complete but a good start
2021-12-05 17:15:34 -06:00
Lance Edgar
fb75927662 Update changelog 2021-12-03 09:43:38 -06:00
Lance Edgar
113378dea2 Use common logic for basic product refresh in label batch 2021-12-02 14:40:01 -06:00
Lance Edgar
0bb3b4bd05 Make stale timeout configurable, change default for datasync/collectd 2021-11-30 16:33:27 -06:00
Lance Edgar
b427eaeb3e Update changelog 2021-11-29 21:02:24 -06:00
Lance Edgar
fef2d29a0c Always "require" config files when making config object
from there, those files may just "include" or may also "require" other
files.  but the initial ones seem to important not to require
2021-11-29 19:26:21 -06:00
Lance Edgar
46855c6c2a Add rattail datasync remove-settings command
mostly for use when cloning production database to stage/testing, so
you'd want to configure datasync via files only in those environments
2021-11-29 19:25:25 -06:00
Lance Edgar
e6638df132 Allow loading "disabled" datasync profiles, if caller specifies
this is for sake of web app configuration tool, so it can show all
profiles enabled or not
2021-11-29 17:13:39 -06:00
Lance Edgar
6385cc948c Update changelog 2021-11-28 10:58:50 -06:00
Lance Edgar
3d8590230e Include current time in datasync/collectd output 2021-11-28 10:57:32 -06:00
Lance Edgar
66d7910770 Add some sale pricing logic for custorder batch 2021-11-27 19:07:33 -06:00
Lance Edgar
e6356d9360 Add setting for receiving from PO w/ invoice 2021-11-27 17:42:24 -06:00
Lance Edgar
fdaacdc4ac Update changelog 2021-11-27 15:16:39 -06:00
Lance Edgar
89783e0a0d Add basic stale queue detection for datasync/collectd 2021-11-27 15:15:29 -06:00
Lance Edgar
6a2454c212 Only specify interval if we receive one from collectd 2021-11-27 15:15:17 -06:00
Lance Edgar
6b35ca5ada Update changelog 2021-11-27 14:39:15 -06:00
Lance Edgar
be24d23682 Add workarounds if collectd does not pass env variables (?)
not clear why it wouldn't do that, but was getting key errors when i
assumed the values were there...
2021-11-27 14:38:11 -06:00
Lance Edgar
958731e13c Update changelog 2021-11-27 14:01:32 -06:00
Lance Edgar
37a23bf35e Add rattail datasync collectd sub-sub-command
still just proving concepts, but this seems like the right direction..
2021-11-27 14:00:07 -06:00
Lance Edgar
a0054d223a Move datasync command logic to its own module 2021-11-27 09:56:17 -06:00
Lance Edgar
0e295b5a1c Postpone import in case no sqlalchemy 2021-11-27 08:36:56 -06:00
Lance Edgar
faea1411fd Update changelog 2021-11-26 15:58:37 -06:00
Lance Edgar
15d4254664 Only make app if we have config
which i guess we may not, at least in tests
2021-11-26 13:59:23 -06:00
Lance Edgar
ccb641f7e4 Set Subcommand.app within constructor, for convenience 2021-11-26 12:56:01 -06:00
Lance Edgar
4eb29cc746 Only coerce logging timestamps if we have a timezone set
otherwise logging itself will fail, which is bad
2021-11-26 10:39:16 -06:00
Lance Edgar
be4497e1f3 Add way to "require" included config files 2021-11-26 10:38:47 -06:00
Lance Edgar
6f25dab0b3 Update changelog 2021-11-25 19:00:35 -06:00
Lance Edgar
6ea529132e Add basic support for receiving from PO with invoice 2021-11-25 16:56:23 -06:00
Lance Edgar
f788672654 Update changelog 2021-11-14 13:26:23 -06:00