Repository navigation
Django q - #1398
Django q#1398
Conversation
- Allows us to track if the worker is running - Due to Stat.get_all() not always working
| return [int(g) for g in match.groups()] | ||
|
|
||
|
|
||
| def versionTupleToInt(version): |
There was a problem hiding this comment.
You can compare version tuples directly.
(2,4,1) < (2,4,2): True
(3) > (2,4,2): True
There was a problem hiding this comment.
Huh, you learn something new every day. I did not know Python could do that!
| now = datetime.now() | ||
| past = now - timedelta(minutes=10) | ||
|
|
||
| results = Success.objects.filter( |
There was a problem hiding this comment.
I would just delete any heart beat other than the last one while I'm in this code.
|
|
||
| clusters = Stat.get_all() | ||
|
|
||
| if len(clusters) > 0: |
There was a problem hiding this comment.
if clusters:
return True
Since it's more pythonic.
Or if stat.get_all(): return True
|
|
||
| all_healthy = True | ||
|
|
||
| for k in status.keys(): |
There was a problem hiding this comment.
all_healthy = all([v for v in status.values()])
6d599c8 to
c6e154f
Compare
|
I tend to say yes for simplicity with dealing with the media/statics, but you could also just make life easier for yourself and just provide a configuration for a docker-compose with nginx sitting in front of it. |
- Note: not ready yet!
- All InvenTree data now in a single subdir - Copy default config file (if it does not exist) - Config file is accessible from outside world - Update start_server and start_worker scripts
|
@rcludwick I think this is ready for a test drive now. Please let me know if you can get it working on your end, and if there's anything else I should add, before it goes live on dockerhub |
# Conflicts: # InvenTree/InvenTree/version.py
|
Apologies, I didn't get a chance this weekend to look at it this weekend. I can't wait to try it out on my "production" server at home. If I see anything wrong, I'll just file issues/PR's. 🎉 |
Support for background tasks.
Docs: inventree/inventree-docs#92