Comments (7)
somehow the original report has been deleted in the meantime, and this results in a new report object with an empty log save for the Started/Finished lines
from django-uwsgi-taskmanager.
I need a bit of information to try and help you.
How are you using the taskmanager (are you trying the demo project or are you using it inside one of your projects)?
Which django, and python releases are you using? I can see python 3.9, but what release of django?
When did this happen? While saving a report, but what kind of task where you running?
from django-uwsgi-taskmanager.
Hi! I am using the taskmanager inside of my project
The issue doesn't happen with scheduled, recurring tasks.
The problem task is started this way (inside a view)
Task.objects.filter(category__name="x", command__app_name="x", command__name="x", arguments="x").first().launch()
I am running django 3.1.4
from django-uwsgi-taskmanager.
This is almost definitely due to self.keep_last_n_reports()
being called right after spooling, in the original thread. This has a race condition that can delete the report that has just been created in the spooler process. So when the spooler process then tries to update the report, it is already gone.
So:
keep_last_n_reports
should probably be run just before spooling, or at the end ofexec_command_task
- use a transaction and
select_for_update
, or removeupdate_fields
inreport_obj.save
from django-uwsgi-taskmanager.
actually keep_last_n_reports
is already run at the end of exec_command_task
, so no need to run before spooling
from django-uwsgi-taskmanager.
Seems like a good one. Will merge.
from django-uwsgi-taskmanager.
Problem has beel fixed in release 2.2.9
from django-uwsgi-taskmanager.
Related Issues (20)
- Better explanation of the goal and features
- Add a recognizable license from Github
- Fix TypeError in taskcategory admin
- Notification system at the end of a task
- Real-time log streaming for the report
- Add continuous integration configuration files
- Start using type hinting
- Templates Loader
- Next ride must start at the given time, not at the end of the task
- Respawning uwsgi processes causes multiple task invocations HOT 1
- Changing scheduling and repetition fields leaves unwanted files in the spooler
- Linkified strings in log messages display not correct
- Tasks with status SPOOLED but missing spooled task files never run HOT 16
- Error user Windows
- Fix convert to local datetime function
- Update and complete `setup.py`
- Add missings setps in `README.md`
- Release django-uwsgi-taskmanager v1.0.1
- Fix broken 1.0.1 URL in `CHANGELOG.md`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-uwsgi-taskmanager.