-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(crons): Add stub consumers for clock tick / tasks
We will use these to process clock ticks and their associated tasks
- Loading branch information
1 parent
aed6fb4
commit 6444c3e
Showing
8 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from __future__ import annotations | ||
|
||
import logging | ||
from collections.abc import Mapping | ||
|
||
from arroyo.backends.kafka.consumer import KafkaPayload | ||
from arroyo.processing.strategies.abstract import ProcessingStrategy, ProcessingStrategyFactory | ||
from arroyo.processing.strategies.commit import CommitOffsets | ||
from arroyo.types import Commit, Partition | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class MonitorClockTasksStrategyFactory(ProcessingStrategyFactory[KafkaPayload]): | ||
def __init__(self) -> None: | ||
pass | ||
|
||
def create_with_partitions( | ||
self, | ||
commit: Commit, | ||
partitions: Mapping[Partition, int], | ||
) -> ProcessingStrategy[KafkaPayload]: | ||
return CommitOffsets(commit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from __future__ import annotations | ||
|
||
import logging | ||
from collections.abc import Mapping | ||
|
||
from arroyo.backends.kafka.consumer import KafkaPayload | ||
from arroyo.processing.strategies.abstract import ProcessingStrategy, ProcessingStrategyFactory | ||
from arroyo.processing.strategies.commit import CommitOffsets | ||
from arroyo.types import Commit, Partition | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class MonitorClockTickStrategyFactory(ProcessingStrategyFactory[KafkaPayload]): | ||
def __init__(self) -> None: | ||
pass | ||
|
||
def create_with_partitions( | ||
self, | ||
commit: Commit, | ||
partitions: Mapping[Partition, int], | ||
) -> ProcessingStrategy[KafkaPayload]: | ||
return CommitOffsets(commit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters