feat: Add scheduler and fix some types
All checks were successful
Build Docker / BuildImage (push) Successful in 58s

This commit is contained in:
2025-07-24 16:33:31 +10:00
parent 3ddf7c5dfe
commit 1ac41d5582
5 changed files with 49 additions and 9 deletions

View File

@@ -140,7 +140,6 @@ def notify_expiries():
if not domains:
print("No domains found.")
return
current_block = get_current_block()
@@ -154,7 +153,6 @@ def notify_expiries():
"time": f"{blocks_remaining // 144} days" # Assuming 144 blocks per day
}
for notification in domains[domain]:
print(blocks_remaining, notification['blocks'])
if notification['blocks'] <= blocks_remaining and notification['blocks'] >= (blocks_remaining - 1): # Just in case there are 2 blocks really close together
# Check if last block notified is more than current block + 5
if notification.get('last_block_notified', -1) < (current_block - 5):