Compare commits

...

2 Commits

Author SHA1 Message Date
5ee1629c79 oops 2021-03-28 09:53:16 -04:00
00f5aef721 Update redis_publish to add subproject 2021-03-28 09:42:52 -04:00
2 changed files with 8 additions and 4 deletions

View File

@ -17,9 +17,13 @@ def get_redis():
) )
def redis_publish(rdb, item, item_source, item_type, item_category="x"): def redis_publish(rdb, item, item_project, item_type, item_subproject=None, item_category="x"):
item_project = item_project.replace(".", "-")
item_subproject = item_subproject.replace(".", "-")
item_source = item_project if not item_subproject else f"{item_project}.{item_subproject}"
item_source = item_source.replace(".", "-")
item_type = item_type.replace(".", "-") item_type = item_type.replace(".", "-")
item_category = item_category.replace(".", "-") item_category = item_category.replace(".", "-")
@ -28,7 +32,7 @@ def redis_publish(rdb, item, item_source, item_type, item_category="x"):
rdb.publish(routing_key, item) rdb.publish(routing_key, item)
for arc_list in ARC_LISTS: for arc_list in ARC_LISTS:
routing_key = f"{arc_list}.{item_source}.{item_type}.{item_category}" routing_key = f"{arc_list}.{item_source}.{item_type}.{item_category}"
rdb.publish(routing_key, item) rdb.lpush(routing_key, item)
def get_web(): def get_web():

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup( setup(
name="hexlib", name="hexlib",
version="1.32", version="1.33",
description="Misc utility methods", description="Misc utility methods",
author="simon987", author="simon987",
author_email="me@simon987.net", author_email="me@simon987.net",