-
Notifications
You must be signed in to change notification settings - Fork 20
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
Implement validator for TaskModel.desc field or crop to 64 char? #27
Comments
jedie
pushed a commit
that referenced
this issue
May 31, 2021
I thinks the length cut of the description should be made in user code, where you create ProcessInfo... Because a error like "Data too long for column 'desc' at row 1" is confusing, i add a check here: #29 The problem is that ProcessInfo use |
jedie
pushed a commit
that referenced
this issue
May 31, 2021
phihag
added a commit
that referenced
this issue
May 31, 2021
Fix #27 Data too long for column 'desc'
@Skrattoune it's released in v0.4.1 |
Skrattoune
added a commit
to Skrattoune/django-huey-monitor
that referenced
this issue
Mar 24, 2022
Coming back to boxine#27, I had in a middle of a long series of tasks one of them which crashed due to a ValidationError('Process info description overlong'). It reminded me about boxine#27 where I thought we implemented a crop of TaskModel.desc to 64 characters. As stated already at the time. having a desc bigger than 64 char should not for me prevent a task to run. Especially when task description are generated automatically I would therefore suggest implementing the following changes
Skrattoune
added a commit
to Skrattoune/django-huey-monitor
that referenced
this issue
Mar 30, 2022
Skrattoune
added a commit
to Skrattoune/django-huey-monitor
that referenced
this issue
Mar 30, 2022
Skrattoune
added a commit
to Skrattoune/django-huey-monitor
that referenced
this issue
Mar 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I had a strange error
error - (1406, "Data too long for column 'desc' at row 1")
After browsing the net, and then exploring the code of huey-monitor,
I finally manage to realize the reason my task was failling was that the description I was setting for my
ProcessInfo
was 67 char while only 64 were authorized by theTaskModel
model.This error was quite small, and may happen easily ... but it was quite hard to find-out.
I therefore would suggest to make this error much more easy to find-out for users.
One solution could be to implement a custom validator for the
TaskModel.desc
field to document specifically the error for the user.However, having a
desc
bigger than 64 char should not for me prevent a task to run.I would therefore suggest another simpler solution:
to implement in the
ProcessInfo
model a crop to 64 char when updatingTaskModel
.A minimal implementation could be:
The text was updated successfully, but these errors were encountered: