Skip to content

Commit

Permalink
Merge pull request #86 from PotLock/grantpick
Browse files Browse the repository at this point in the history
Grantpicks
  • Loading branch information
Prometheo authored Sep 19, 2024
2 parents f98d52f + a61d175 commit ead9805
Show file tree
Hide file tree
Showing 18 changed files with 1,747 additions and 12 deletions.
12 changes: 12 additions & 0 deletions base/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,24 @@
"schedule": crontab(minute="*/5"), # Executes every 5 minutes
"options": {"queue": "beat_tasks"},
},
"fetch_stellar_events_every_minute": {
"task": "indexer_app.tasks.stellar_event_indexer",
"schedule": crontab(minute="*/1"), # Executes every 1 minutes
"options": {"queue": "beat_tasks"},
},
"process_stellar_event_every_minute": {
"task": "indexer_app.tasks.process_stellar_events",
"schedule": crontab(minute="*/1"), # Executes every 1 minutes
"options": {"queue": "beat_tasks"},
},
}

app.conf.task_routes = {
"indexer_app.tasks.update_account_statistics": {"queue": "beat_tasks"},
"indexer_app.tasks.fetch_usd_prices": {"queue": "beat_tasks"},
"indexer_app.tasks.update_pot_statistics": {"queue": "beat_tasks"},
"indexer_app.tasks.stellar_event_indexer": {"queue": "beat_tasks"},
"indexer_app.tasks.process_stellar_events": {"queue": "beat_tasks"},
}

SPOT_INDEXER_QUEUE_NAME = "spot_indexing"
4 changes: 3 additions & 1 deletion base/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@

POTLOCK_TLA = "potlock.testnet" if ENVIRONMENT == "testnet" else "potlock.near"
NADABOT_TLA = "nadabot.testnet" if ENVIRONMENT == "testnet" else "nadabot.near"

STELLAR_CONTRACT_ID = "CBP5F3C5SPPJRNRJSOOQQKUGX2CE2G6BRV34MOEBHNFGBRQ5ZSXNGWAB" if ENVIRONMENT == "testnet" else "CBP5F3C5SPPJRNRJSOOQQKUGX2CE2G6BRV34MOEBHNFGBRQ5ZSXNGWAB"
STELLAR_PROJECTS_REGISTRY_CONTRACT = "CBYUL5Y4GTIZAST3W2LVYKFTYNJA3EUG3MN4W2TTFONV6VXEACMRLBEP"
NEAR_SOCIAL_CONTRACT_ADDRESS = (
"v1.social08.testnet" if ENVIRONMENT == "testnet" else "social.near"
)
Expand Down Expand Up @@ -106,6 +107,7 @@
"tokens",
"nadabot",
"chains",
"grantpicks"
]

DEFAULT_PAGE_SIZE = 30
Expand Down
Empty file added grantpicks/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions grantpicks/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
Empty file added grantpicks/api.py
Empty file.
6 changes: 6 additions & 0 deletions grantpicks/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class GrantpicksConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "grantpicks"
Loading

0 comments on commit ead9805

Please sign in to comment.