-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0.2.0: refactor producer logic from decorator to class. (#36)
### Breaking Changes - rewrite heizer producer to be a class instead of decorator. There is no clear benefit to create producer as decorator - updated class names ### New Features: - support retry in consumer - add helpers to list, list topics - add consumer signal - write consumer status log file for health checking - support async produce in producer ### Improvements - add more logs
- Loading branch information
Showing
25 changed files
with
954 additions
and
443 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -156,3 +156,5 @@ cython_debug/ | |
# Editors | ||
.idea | ||
.vscode | ||
.fleet | ||
public |
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,40 @@ | ||
# Main/Dev | ||
|
||
|
||
### Features | ||
|
||
### Improvements | ||
|
||
### Fixes | ||
|
||
--- | ||
|
||
# Releases | ||
|
||
## 0.2.0 | ||
|
||
### Breaking Changes | ||
|
||
- rewrite heizer producer to be a class instead of decorator. There is no clear benefit to create | ||
producer as decorator | ||
- updated class names | ||
|
||
### New Features: | ||
|
||
- support retry in consumer | ||
- add helpers to list, list topics | ||
- add consumer signal | ||
- write consumer status log file for health checking | ||
- support async produce in producer | ||
|
||
### Improvements | ||
|
||
- add more logs | ||
|
||
--- | ||
|
||
## 0.1.5 | ||
|
||
### Improvements | ||
|
||
- improve consumer |
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,21 @@ | ||
import json | ||
import pathlib | ||
|
||
import requests | ||
|
||
|
||
def create(): | ||
versions = [{"name": "main", "url": "https://heizer.claudezss.com/docs/main"}] | ||
|
||
rsp = requests.get("https://api.github.com/repos/claudezss/heizer/releases?per_page=100") | ||
d = rsp.json() | ||
for item in d: | ||
release_name = item["name"] | ||
versions.append({"name": release_name, "url": f"https://heizer.claudezss.com/docs/{release_name}/"}) | ||
|
||
with open(pathlib.Path(__file__).parent / "versions.json", "+w") as f: | ||
json.dump(versions, f, indent=4) | ||
|
||
|
||
if __name__ == "__main__": | ||
create() |
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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
{%- if current_version %} | ||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions"> | ||
<script src="_static/jquery.js"></script> | ||
<script> | ||
fetch('./../versions.json') | ||
.then(response => response.json()) | ||
.then(data => { | ||
var myDl = document.getElementById('versions'); | ||
data.map(function (item) { | ||
var dd = document.createElement('dd'); | ||
var a = document.createElement('a') | ||
a.textContent = item.name; | ||
a.href = item.url; | ||
dd.appendChild(a); | ||
myDl.appendChild(dd); | ||
}) | ||
}); | ||
</script> | ||
<span class="rst-current-version" data-toggle="rst-current-version"> | ||
|
||
<span class="fa fa-book"> Other Versions</span> | ||
v: {{ current_version.name }} | ||
v: {{ release }} | ||
<span class="fa fa-caret-down"></span> | ||
</span> | ||
<div class="rst-other-versions"> | ||
{%- if versions.tags %} | ||
<dl> | ||
<div class="rst-other-versions" > | ||
<dl id="versions"> | ||
<dt>Tags</dt> | ||
{%- for item in versions.tags %} | ||
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd> | ||
{%- endfor %} | ||
</dl> | ||
{%- endif %} | ||
{%- if versions.branches %} | ||
<dl> | ||
<dt>Branches</dt> | ||
{%- for item in versions.branches %} | ||
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd> | ||
{%- endfor %} | ||
</dl> | ||
{%- endif %} | ||
</div> | ||
</div> | ||
{%- endif %} |
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 |
---|---|---|
@@ -1,16 +1,24 @@ | ||
from heizer._source.admin import create_new_topic, get_admin_client | ||
from heizer._source.consumer import consumer | ||
from heizer._source.message import HeizerMessage | ||
from heizer._source.producer import producer | ||
from heizer._source.topic import HeizerTopic | ||
from heizer.config import HeizerConfig | ||
from heizer._source.admin import create_new_topics, delete_topics, get_admin_client, list_topics | ||
from heizer._source.consumer import ConsumerSignal, consumer | ||
from heizer._source.message import Message | ||
from heizer._source.producer import Producer | ||
from heizer._source.status_manager import read_consumer_status, write_consumer_status | ||
from heizer._source.topic import Topic | ||
from heizer.config import BaseConfig, ConsumerConfig, ProducerConfig | ||
|
||
__all__ = [ | ||
"consumer", | ||
"producer", | ||
"HeizerConfig", | ||
"HeizerTopic", | ||
"HeizerMessage", | ||
"create_new_topic", | ||
"ConsumerSignal", | ||
"Producer", | ||
"BaseConfig", | ||
"ProducerConfig", | ||
"ConsumerConfig", | ||
"Message", | ||
"Topic", | ||
"create_new_topics", | ||
"get_admin_client", | ||
"write_consumer_status", | ||
"read_consumer_status", | ||
"delete_topics", | ||
"list_topics", | ||
] |
Oops, something went wrong.