Rapidata signal
RapidataSignal #
A live handle to a Rapidata signal.
A signal creates one audience job on a recurring schedule — every interval tick
spawns a :class:RapidataJob built from the signal's job definition and audience.
Use the manager (attr:
RapidataClient.signals) to create or look up signals;
use the methods here to control a signal and reach the jobs it produces.
This is a live handle: identity fields (id, audience_id,
job_definition_id, created_at …) are fixed at creation, while mutable state
(name, is_paused, next_run_at …) is re-fetched from the server on every
access so it never goes stale.
Source code in src/rapidata/rapidata_client/signal/rapidata_signal.py
pause #
pause() -> RapidataSignal
Pause the signal. Scheduled jobs stop until meth:
resume is called.
Returns:
| Name | Type | Description |
|---|---|---|
RapidataSignal |
RapidataSignal
|
|
Source code in src/rapidata/rapidata_client/signal/rapidata_signal.py
resume #
resume() -> RapidataSignal
Resume a paused signal. Scheduled jobs start firing again at the configured interval.
Returns:
| Name | Type | Description |
|---|---|---|
RapidataSignal |
RapidataSignal
|
|
Source code in src/rapidata/rapidata_client/signal/rapidata_signal.py
delete #
Delete the signal. Jobs it already created are unaffected.
Source code in src/rapidata/rapidata_client/signal/rapidata_signal.py
trigger #
Trigger the signal manually, creating one extra job outside the schedule.
The job is created asynchronously; use meth:
wait_for_next_job to block
until it appears.
Source code in src/rapidata/rapidata_client/signal/rapidata_signal.py
update #
update(
*,
name: str | None = None,
description: str | None = None,
interval_hours: float | None = None
) -> RapidataSignal
Update mutable fields on the signal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
New display name. Omit to leave unchanged. |
None
|
description
|
str | None
|
New description. Omit to leave unchanged. |
None
|
interval_hours
|
float | None
|
New scheduling interval, in hours. Omit to leave unchanged. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
RapidataSignal |
RapidataSignal
|
|
Source code in src/rapidata/rapidata_client/signal/rapidata_signal.py
get_jobs #
get_jobs(
page: int = 1,
page_size: int = 20,
sort_descending: bool = True,
) -> list[RapidataJob]
List the jobs this signal has created (newest first by default).
Each scheduled or manual firing that spawned a job is returned as a live
:class:RapidataJob. Firings that were skipped without creating a job are
not included.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page
|
int
|
1-indexed page number. |
1
|
page_size
|
int
|
Number of firings to inspect per page. |
20
|
sort_descending
|
bool
|
When |
True
|
Returns:
| Type | Description |
|---|---|
list[RapidataJob]
|
list[RapidataJob]: The jobs on the requested page. |
Source code in src/rapidata/rapidata_client/signal/rapidata_signal.py
wait_for_next_job #
wait_for_next_job(
timeout: float = 300, poll_interval: float = 5.0
) -> RapidataJob
Block until the signal's next firing creates a job, then return it.
Waits for a firing that started after this call and has spawned a job
(skipped firings are ignored). Handy right after meth:
trigger. The
returned :class:RapidataJob is live — call get_results() or
display_progress_bar() on it to follow the job to completion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float
|
Maximum seconds to wait. Raises |
300
|
poll_interval
|
float
|
Seconds between polls. |
5.0
|
Returns:
| Name | Type | Description |
|---|---|---|
RapidataJob |
RapidataJob
|
The job created by the next firing. |
Raises:
| Type | Description |
|---|---|
TimeoutError
|
If no new job is created within |