Skip to content

Commit d44ab56

Browse files
committed
updated celery docs to use abcmeta
1 parent 358fbed commit d44ab56

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,17 @@ In order to change the duration of a lock, set the DB_MUTEX_TTL_SECONDS variable
5252
Django DB Mutex can be used with celery's tasks in the following manner.
5353

5454
from celery import Task
55+
from abc import ABCMeta, abstractmethod
5556

5657
class NonOverlappingTask(Task):
58+
__metaclass__ = ABCMeta
59+
60+
@abstractmethod
5761
def run_worker(self, *args, **kwargs):
5862
"""
5963
Run worker code here.
6064
"""
61-
raise NotImplementedError()
65+
pass
6266

6367
def run(self, *args, **kwargs):
6468
try:

0 commit comments

Comments
 (0)