Skip to Content

Task Expiration

Expiration in Qrambo is a mechanism to control how long tasks and assignments remain valid. This helps in managing workflow timeouts and ensuring tasks don’t remain unprocessed indefinitely.

⚠️

Tasks will be expired even if ASSIGNED or not when the time is up.

Tasks may have Service Level Agreements (SLAs) that require completion within specific timeframes. Some tasks may become invalid after their SLA expires, or you may want to trigger default actions after expiration to maintain your operations.

Use Cases

Main purpose is to ensure that your operations remain efficient and to prevent unnecessary processing of tasks that are no longer relevant

Tasks can be expired for the following reasons:

  1. You may have a lot of requests such a short time, and you know that you can’t process all of them.

  2. Your reviewers may not be available at the time of the task.

What should you do when a task expires?

The best action depends on your use case, but here are some suggestions:

  1. You can use AI output directly if you want to maximize recall. For example, if you’re monitoring patients for falls from beds, you can use Qrambo with humans in the loop to minimize false alarms. If a task hasn’t been completed within 30 seconds, you might trigger an alarm since you don’t want to miss any critical events.

  2. You can ignore AI output if you want to maximize precision. For example, when detecting fraud in transactions, if a task hasn’t been completed within 30 seconds, you might ignore the alarm to avoid triggering false alarms that could unnecessarily disturb customers.

Task Expiration

Tasks can be configured to expire in two ways:

1. Using seconds_to_expire

{ "input_data": { ... }, "seconds_to_expire": 3600 // Task will expire in 1 hour }

2. Using expire_at

{ "input_data": { ... }, "expire_at": "2024-01-01T12:00:00Z" // Task will expire at specific time }

Assignment Expiration

When grabbing or assigning tasks, you can set expiration for the assignment:

{ "seconds_to_expire": 1800, // Assignment will expire in 30 minutes "expire_at": "2024-01-01T12:00:00Z" // Alternative: specific expiration time }

Rules and Constraints

  • Minimum expiration time: 10 seconds
  • Must be in the future when using expire_at
  • Cannot be modified after task creation

Query Support

You can query tasks based on expiration:

  • expired_at__gte: Tasks expiring after a specific time
  • expired_at__lte: Tasks expiring before a specific time

Best Practices

  1. Set reasonable expiration times based on your workflow
  2. Consider using expire_at for time-sensitive tasks
  3. Monitor expired tasks to identify workflow bottlenecks
  4. Use shorter expiration times for urgent tasks
  5. Consider timezone differences when using expire_at it must be UTC
Last updated on