no refresh on inactive users
This commit is contained in:
parent
71042a608c
commit
7df40d2472
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ class Command(BaseCommand):
|
|||
|
||||
def handle(self, *args, **options):
|
||||
count = 0
|
||||
for user in User.objects.filter(mastodon_last_refresh__lt=timezone.now() - timedelta(hours=24)):
|
||||
for user in User.objects.filter(mastodon_last_refresh__lt=timezone.now() - timedelta(hours=24), is_active=True):
|
||||
if user.mastodon_token:
|
||||
print(f"Refreshing {user}")
|
||||
if user.refresh_mastodon_data():
|
||||
|
|
Loading…
Add table
Reference in a new issue