Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pikatasks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
django
pikatasks
Commits
f54e9e2c
Commit
f54e9e2c
authored
6 years ago
by
Dennis Ahrens
Browse files
Options
Downloads
Patches
Plain Diff
If autodiscovery fails on an app that has 'tasks' in his name - warning
parent
22f6305b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pikatasks/django_compat.py
+6
-2
6 additions, 2 deletions
pikatasks/django_compat.py
with
6 additions
and
2 deletions
pikatasks/django_compat.py
+
6
−
2
View file @
f54e9e2c
...
@@ -78,7 +78,11 @@ def autodiscover_tasks(apps=None, modules=("tasks",)):
...
@@ -78,7 +78,11 @@ def autodiscover_tasks(apps=None, modules=("tasks",)):
importlib
.
import_module
(
full_module_name
)
importlib
.
import_module
(
full_module_name
)
# just importing the module is perfectly enough, each task will register itself on import
# just importing the module is perfectly enough, each task will register itself on import
logger
.
info
(
"
Autodiscover: imported
\"
{0}
\"
"
.
format
(
full_module_name
))
logger
.
info
(
"
Autodiscover: imported
\"
{0}
\"
"
.
format
(
full_module_name
))
except
ImportError
:
except
ImportError
as
ie
:
logger
.
debug
(
"
Autodiscover: module
\"
{0}
\"
does not exist
"
.
format
(
full_module_name
))
msg
=
"
Autodiscover: module
\"
{0}
\"
does not exist: {1}
"
.
format
(
full_module_name
,
str
(
ie
))
if
'
tasks
'
in
app_name
:
logger
.
warning
(
msg
)
else
:
logger
.
debug
(
msg
)
return
utils
.
all_tasks
return
utils
.
all_tasks
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment