Created
May 17, 2023 09:53
-
-
Save jsam/bbb6aefb8f17d145936156fdc897b390 to your computer and use it in GitHub Desktop.
Sanin example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_enqueue_geohash_fetch(redis_conn): | |
enqueue_geohash_fetch() | |
# NOTE: provjeris ovjde da li je job enqueuan na zadanom queue i ima odgovarajuce parametrom | |
redis_conn.get("___") | |
@task | |
def enqueue_geohash_fetch(): | |
"""Enqueues retrieval job for each tenant every N hours.""" | |
qs = Client.objects.exclude(tenant_name__startwith="demo_").all() | |
for client in qs: | |
import_geohash.delay(client) | |
@task | |
def import_geohash(tenant_name, ...): | |
"""Get geohash for a tenant.""" | |
... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment