-
Notifications
You must be signed in to change notification settings - Fork 264
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
Simplify/reduce natural keys for Job model #2611
Comments
Let's keep this simple make the |
Startup check for potentially invalid data or pattern for appending to name |
Just to clarify, do we want to use the job class name or the job Ex: class ExampleJob(Job):
# specify template_name to override the default job scheduling template
template_name = "example_plugin/example_with_custom_template.html"
class Meta:
name = "Example job, does nothing"
description = """
Markdown Formatting
*This is italicized*
"""
|
Right now the job model @classproperty
def name(cls): # pylint: disable=no-self-argument
return getattr(cls.Meta, "name", cls.__name__) If we keep this behavior, it allows you to explicitly set the name using |
Given that
This kind of thing is why the current model also stores the
My hope is that with the natural-keys work this question becomes moot :-) But in the short term, yeah, if |
In that case it sounds like |
Decisions made in parking lot:
|
Closed with #3431 |
As ...
Cora - Coder
I want ...
To have a simpler natural key for the
Job
model. Currently the uniqueness criteria forJob
, and hence its natural keys, are either of:which, among other things, result in the need for the
slug
field to support excessively long (320 characters at present - 20source
+ 100git_repository.name
+ 100module_name
+ 100job_class_name
) autogenerated values.As a part of #765 we should rethink this design.
So that ...
slug
field (if we even keep it, see Remove the usage of slug fields #2312) can be shortened to a more reasonable lengthI know this is done when...
name
like many/most other models have -class_path
as currently implemented fails the "reasonably short" requirement)Optional - Feature groups this request pertains to.
Database Changes
Yes, changes to the
Job
data model.External Dependencies
None expected
The text was updated successfully, but these errors were encountered: