Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of the batch jobs #831

Open
kousu opened this issue Apr 5, 2018 · 0 comments
Open

Get rid of the batch jobs #831

kousu opened this issue Apr 5, 2018 · 0 comments

Comments

@kousu
Copy link

kousu commented Apr 5, 2018

Sous-Chef's reliance on batch-jobs for proper functioning makes it fragile. I propose that a lot of the core logic needs to be rethought in a functional programming style, and the batch jobs done away with.

Instead of having a bunch of states that orders flow through, there should be; especially, billing should not be done based on "delivered" orders (especially since we don't actually know what orders got delivered on any particular day), billing should be calculated by summing --- functionally --- all orders from the requested month not marked cancelled or no-charge.
For that matter, order.state should dropped and replaced with bool order.cancelled and bool order.no_charge -- separately flags, only ever set manually.
Instead of scheduled client status changes that need to be flipped overnight, there should be regions of client status -- the way iCal works -- and these statuses should be viewable on a calendar. Actually, can we just use a calendar directly? Is CalDAV exposable to django somehow?
probably a bunch of other things.

This would be a pretty sharp rewrite, so I'm recording it here for planning purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant