INNER CODE UNIT · Python

handler

WaveSpeedAI/waverless · test_worker.py:15

def handler(job):
    """
    Simple task handler
    """
    print(f"\n{'='*50}")
    print(f"Processing job: {job['id']}")
    print(f"Input: {job.get('input', {})}")
    print(f"{'='*50}\n")

    job_input = job.get("input", {})
    prompt = job_input.get("prompt", "")

    # Simulate processing time
    print("Processing...")
    time.sleep(3)

    result = {
        "result": f"Processed: {prompt}",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…