Spaces:
Paused
Paused
Download scratch/trigger_pulse.py from 3SCError404/nexus: direct link, hf CLI and curl.
- Browser
- Download file 642 Bytes
-
https://huggingface.co/spaces/3SCError404/nexus/resolve/main/scratch/trigger_pulse.py
- Command line
-
hf download hf://spaces/3SCError404/nexus/scratch/trigger_pulse.py
-
curl -L -o trigger_pulse.py https://huggingface.co/spaces/3SCError404/nexus/resolve/main/scratch/trigger_pulse.py
642 Bytes
| import asyncio | |
| import sys | |
| import os | |
| # Ensure current directory is in path | |
| sys.path.append(os.getcwd()) | |
| from arq import create_pool | |
| from arq.connections import RedisSettings | |
| from core.config import get_settings | |
| async def trigger(): | |
| settings = get_settings() | |
| # Explicitly NOT setting worker mode here, we want to enqueue from an "API" context | |
| redis = await create_pool(RedisSettings.from_dsn(settings.clean_redis_url)) | |
| await redis.enqueue_job('nexus_pulse_check') | |
| print("✅ High-priority 'nexus_pulse_check' enqueued! Watch the Worker Lab for a new SUCCESS row.") | |
| if __name__ == "__main__": | |
| asyncio.run(trigger()) | |