mirror of
https://github.com/DaanSelen/meshbook.git
synced 2026-02-20 08:22:11 +00:00
INF: Added minimal information dumps.
This commit is contained in:
@@ -5,6 +5,7 @@ import asyncio
|
|||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
import json
|
import json
|
||||||
|
import math
|
||||||
import os
|
import os
|
||||||
import yaml
|
import yaml
|
||||||
import websockets
|
import websockets
|
||||||
@@ -207,7 +208,10 @@ class MeshcallerProcessor:
|
|||||||
print(json.dumps(message, indent=4))
|
print(json.dumps(message, indent=4))
|
||||||
response_counter += 1 # Increment response counter
|
response_counter += 1 # Increment response counter
|
||||||
|
|
||||||
print(response_counter % len(target_ids))
|
if not args.silent:
|
||||||
|
print("Current Batch: {}".format(math.ceil(response_counter/len(target_ids))))
|
||||||
|
print("Current Calculation: {} % {} = {}".format(response_counter, len(target_ids), response_counter % len(target_ids)))
|
||||||
|
|
||||||
if response_counter % len(target_ids) == 0:
|
if response_counter % len(target_ids) == 0:
|
||||||
ready_for_next.set()
|
ready_for_next.set()
|
||||||
elif action_type == 'close':
|
elif action_type == 'close':
|
||||||
@@ -266,7 +270,7 @@ class MeshcallerActions:
|
|||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
||||||
# Exit gracefully
|
# Exit gracefully
|
||||||
raise ScriptEndTrigger("All tasks completed successfully.")
|
raise ScriptEndTrigger("All tasks completed successfully: Expected {} Received {}".format(expected_responses, response_counter))
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user