prepare for pr

This commit is contained in:
Florin Barbu 2024-07-25 11:24:31 +03:00
parent cd20829142
commit b2cfa2ecea
No known key found for this signature in database
GPG Key ID: 593D6DBC6D9E5095
2 changed files with 1 additions and 19 deletions

View File

@ -164,6 +164,7 @@ class StatusNode:
return self.api.send_rpc_request("wakuext_createCommunity", params)
@retry(stop=stop_after_delay(20), wait=wait_fixed(0.1), reraise=True)
# wakuext_fetchCommunity times out sometimes so that's why we need this retry mechanism
def fetch_community(self, community_key):
params = [{"communityKey": community_key, "waitForResponse": True, "tryDatabase": True}]
return self.api.send_rpc_request("wakuext_fetchCommunity", params, timeout=2)

View File

@ -1,19 +0,0 @@
import os
import tarfile
root_folder = "." # Set your root folder path here
resources_folder = os.path.join(root_folder, "resources")
# Ensure the resources folder exists
os.makedirs(resources_folder, exist_ok=True)
# Iterate over all items in the resources folder
for item in os.listdir(resources_folder):
item_path = os.path.join(resources_folder, item)
if os.path.isdir(item_path):
# Archive the folder
archive_name = f"{item}.tar"
archive_path = os.path.join(resources_folder, archive_name)
with tarfile.open(archive_path, "w") as tar:
tar.add(item_path, arcname=item)