Skip to content

Commit dbeaaca

Browse files
committed
v0.4.4.10-beta - [FIXES] - Fixed types and an import.
1 parent 7be1a0d commit dbeaaca

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Welcome to the TokenGate repository.
44

5-
### (New hashing options available as of v0.4.4.5, see BETA.md for details)
5+
(Latest fixes include broken import paths and some unclear type declarations.)
66

77
> Read BETA.md for the quickest entry point and overview of the TokenGate.
88
> If you're not sure about this and want to see it in action, go to SETUP.md

spike_detector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from pathlib import Path
3636
from datetime import datetime
3737

38-
from tg_print import tg_print
38+
from .tg_print import tg_print
3939
from .code_inspector import CodeMetrics
4040

4141

tg_print.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# ================================================================== #
4949

5050
_DEFAULT_CHANNELS: dict[str, bool] = {
51-
'gate': False, # admission_gate.py
51+
'gate': True, # admission_gate.py
5252
'pool': False, # token_system.py TokenPool
5353
'token': False, # token_system.py TaskToken lifecycle
5454
'coordinator': False, # operations_coordinator.py

token_system.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ def kill_all_by_operation(self, operation_type: str, reason: str = "admin_bulk_k
654654
tg_print('pool', f'Killed {killed} tokens of type {operation_type}')
655655
return killed
656656

657-
def pause(self, operation_type: str = None, reason: str = "admin_pause"):
657+
def pause(self, operation_type: str, reason: str = "admin_pause"):
658658
"""Pause token or pool."""
659659
if operation_type:
660660
with self._lock:
@@ -664,7 +664,7 @@ def pause(self, operation_type: str = None, reason: str = "admin_pause"):
664664
self._paused.clear()
665665
tg_print('pool', f'PAUSED globally ({reason}) — tokens will accumulate', level='warn')
666666

667-
def resume(self, operation_type: str = None, reason: str = "admin_resume"):
667+
def resume(self, operation_type: str, reason: str = "admin_resume"):
668668
"""Resume token or pool."""
669669
if operation_type:
670670
tokens_to_requeue = []
@@ -690,7 +690,7 @@ def resume(self, operation_type: str = None, reason: str = "admin_resume"):
690690
self._paused.set()
691691
tg_print('pool', f'RESUMED globally ({reason}) — tokens will admit')
692692

693-
def drain(self, operation_type: str = None, reason: str = "admin_drain") -> int:
693+
def drain(self, operation_type: str, reason: str = "admin_drain") -> int:
694694
"""Drain the token or pool."""
695695
waiting = self.get_tokens_by_state(TokenState.WAITING)
696696
killed = 0

0 commit comments

Comments
 (0)