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:
|
if self.last_check and timezone.now() < self.last_check + self.check_interval:
|
||||||
return
|
return
|
||||||
|
|
||||||
# self.lock = True
|
self.lock = True
|
||||||
# self.save()
|
self.save()
|
||||||
execute_feed.delay(self.pk)
|
execute_feed.delay(self.pk)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -11,12 +11,8 @@ from config.celery import app
|
|||||||
@app.task()
|
@app.task()
|
||||||
def execute_feed(feed_pk):
|
def execute_feed(feed_pk):
|
||||||
from feeds.models import Feed
|
from feeds.models import Feed
|
||||||
from django.db import connections
|
|
||||||
|
|
||||||
c = connections['default'].cursor()
|
config._reload_maybe()
|
||||||
print(c.db.__dict__)
|
|
||||||
|
|
||||||
# config._reload_maybe()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
feed = Feed.objects.get(pk=feed_pk)
|
feed = Feed.objects.get(pk=feed_pk)
|
||||||
|
Loading…
Reference in New Issue
Block a user