Skip to content

Commit

Permalink
Merge pull request #66 from Podcastindex-org/hotfix/1.2.9
Browse files Browse the repository at this point in the history
Remove follower check in startup & re-add more hive nodes
  • Loading branch information
agates authored Nov 3, 2022
2 parents 26ecf9f + 880e16e commit be9e5b8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "podping-hivewriter"
version = "1.2.8"
version = "1.2.9"
license = "MIT"
authors = ["Alecks Gates <[email protected]>", "Brian of London <[email protected]>"]
maintainers = ["Alecks Gates <[email protected]>", "Brian of London <[email protected]>"]
Expand Down
8 changes: 6 additions & 2 deletions src/podping_hivewriter/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ def get_client(
nodes = [
"https://api.hive.blog",
"https://api.deathwing.me",
"https://hive-api.arcange.eu",
"https://anyx.io",
"https://api.openhive.network",
"https://api.hive.blue",
"https://hive-api.3speak.tv",
"https://rpc.ecency.com",
"https://hived.emre.sh",
"https://rpc.ausbit.dev",
"https://rpc.podping.org",
]
shuffle(nodes)
client = Client(
Expand Down
19 changes: 1 addition & 18 deletions src/podping_hivewriter/podping_hivewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
PodpingCustomJsonPayloadExceeded,
TooManyCustomJsonsPerBlock,
)
from podping_hivewriter.hive import get_allowed_accounts, get_client
from podping_hivewriter.hive import get_client
from podping_hivewriter.models.hive_operation_id import HiveOperationId
from podping_hivewriter.models.iri_batch import IRIBatch
from podping_hivewriter.models.medium import Medium
Expand Down Expand Up @@ -99,23 +99,6 @@ def __init__(
asyncio.ensure_future(self._startup())

async def _startup(self):

try:
settings = await self.settings_manager.get_settings()
allowed = get_allowed_accounts(
self.lighthive_client, settings.control_account
)
# TODO: Should we periodically check if the account is allowed
# and shut down if not?
if self.server_account not in allowed:
logging.error(
f"Account @{self.server_account} not authorised to send Podpings"
)

except Exception as ex:
logging.exception("Unknown error occurred in _startup", stack_info=True)
raise ex

if self.resource_test and not self.dry_run:
await self.test_hive_resources()

Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_get_allowed_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


@pytest.mark.asyncio
@pytest.mark.skip
async def test_get_allowed_accounts():
# Checks the allowed accounts checkup
client = get_client(loglevel=logging.WARN)
Expand Down

0 comments on commit be9e5b8

Please sign in to comment.