django-celery-beat icon indicating copy to clipboard operation
django-celery-beat copied to clipboard

Adding name col to CrontabSchedule model

Open trianglesis opened this issue 4 years ago • 3 comments

Having a lot of Cron time schedule items is frustrating when they have no verbose and short names, for example.

image

I'm trying to add a name to each - so it will be more visible, what task run on which time, actually.

image image

With this change, it becomes more visible for the human eye what schedule is used for each task. It's also better visible when you want to switch schedules, but the dropdown list is too big.

image

In addition: for years of usage - I have collected dozens of unused schedules and it starting to become a nightmare when you want to clean it up.

trianglesis avatar Dec 15 '21 13:12 trianglesis

@lvelvee kindly have a review when have time

auvipy avatar Dec 17 '21 16:12 auvipy

I'll try to add tests as soon as I figure out how to execute them all. Unfortunately, I can't get to work few tests related to model testing, which I wanted to use as a draft\example to test my changes.

trianglesis avatar Jan 25 '22 06:01 trianglesis

Currently

  • testing the creation of Crontab with valid names or an empty string.
  • testing that PeriodicTask.name has no extra values in it and if PeriodicTask.interval and PeriodicTask.crontab are in a human-readable format (as it was before in name).

trianglesis avatar Jan 25 '22 09:01 trianglesis