fix
This commit is contained in:
parent
90d8c02a08
commit
08e6666437
@ -28,8 +28,8 @@ class Feed(models.Model):
|
||||
if self.last_check and timezone.now() < self.last_check + self.check_interval:
|
||||
return
|
||||
|
||||
# self.lock = True
|
||||
# self.save()
|
||||
self.lock = True
|
||||
self.save()
|
||||
execute_feed.delay(self.pk)
|
||||
|
||||
class Meta:
|
||||
|
@ -11,12 +11,8 @@ from config.celery import app
|
||||
@app.task()
|
||||
def execute_feed(feed_pk):
|
||||
from feeds.models import Feed
|
||||
from django.db import connections
|
||||
|
||||
c = connections['default'].cursor()
|
||||
print(c.db.__dict__)
|
||||
|
||||
# config._reload_maybe()
|
||||
config._reload_maybe()
|
||||
|
||||
try:
|
||||
feed = Feed.objects.get(pk=feed_pk)
|
||||
|
Loading…
Reference in New Issue
Block a user