File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 1010 ALLOW_EDITS = False
1111 pass
1212
13- from .models .helpers import groupresult_model , taskresult_model
13+ from .models .helpers import get_group_result_model , get_task_result_model
1414
15- GroupResult = groupresult_model ()
16- TaskResult = taskresult_model ()
15+ GroupResult = get_group_result_model ()
16+ TaskResult = get_task_result_model ()
1717
1818
1919class TaskResultAdmin (admin .ModelAdmin ):
Original file line number Diff line number Diff line change 1313from kombu .exceptions import DecodeError
1414
1515from ..models .helpers import (
16- chordcounter_model ,
17- groupresult_model ,
18- taskresult_model ,
16+ get_chord_counter_model ,
17+ get_group_result_model ,
18+ get_task_result_model ,
1919)
2020from ..settings import get_task_props_extension
2121
3333class DatabaseBackend (BaseDictBackend ):
3434 """The Django database backend, using models to store task state."""
3535
36- TaskModel = taskresult_model ()
37- GroupModel = groupresult_model ()
38- ChordCounterModel = chordcounter_model ()
36+ TaskModel = get_task_result_model ()
37+ GroupModel = get_group_result_model ()
38+ ChordCounterModel = get_chord_counter_model ()
3939 subpolling_interval = 0.5
4040
4141 def exception_safe_to_retry (self , exc ):
Original file line number Diff line number Diff line change 55from .generic import ChordCounter , GroupResult , TaskResult
66
77
8- def taskresult_model ():
8+ def get_task_result_model ():
99 """Return the TaskResult model that is active in this project."""
1010 if not hasattr (settings , 'CELERY_RESULTS_TASKRESULT_MODEL' ):
1111 return TaskResult
@@ -27,7 +27,7 @@ def taskresult_model():
2727 )
2828
2929
30- def chordcounter_model ():
30+ def get_chord_counter_model ():
3131 """Return the ChordCounter model that is active in this project."""
3232
3333 if not hasattr (settings , 'CELERY_RESULTS_CHORDCOUNTER_MODEL' ):
@@ -50,7 +50,7 @@ def chordcounter_model():
5050 )
5151
5252
53- def groupresult_model ():
53+ def get_group_result_model ():
5454 """Return the GroupResult model that is active in this project."""
5555 if not hasattr (settings , 'CELERY_RESULTS_GROUPRESULT_MODEL' ):
5656 return GroupResult
You can’t perform that action at this time.
0 commit comments