Skip to content

Commit 44020e6

Browse files
committed
updated logging and timeout defaults
1 parent edcdd9c commit 44020e6

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

socketsecurity/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class CliConfig:
3232
integration_type: IntegrationType = "api"
3333
integration_org_slug: Optional[str] = None
3434
pending_head: bool = False
35-
timeout: Optional[int] = None
35+
timeout: Optional[int] = 1200
3636
@classmethod
3737
def from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
3838
parser = create_argument_parser()

socketsecurity/core/socket_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class SocketConfig:
1010
api_key: str
1111
api_url: str = "https://api.socket.dev/v0"
12-
timeout: int = 30
12+
timeout: int = 1200
1313
allow_unverified_ssl: bool = False
1414
org_id: Optional[str] = None
1515
org_slug: Optional[str] = None

socketsecurity/socketcli.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ def cli():
4545

4646
def main_code():
4747
config = CliConfig.from_args()
48-
print(f"config: {config.to_dict()}")
48+
log.debug(f"config: {config.to_dict()}")
4949
output_handler = OutputHandler(config)
5050

5151
sdk = socketdev(token=config.api_token)
52-
print("sdk loaded")
52+
log.debug("sdk loaded")
5353

5454
if config.enable_debug:
5555
set_debug_mode(True)
@@ -64,13 +64,13 @@ def main_code():
6464
socket_config = SocketConfig(
6565
api_key=config.api_token,
6666
allow_unverified_ssl=config.allow_unverified,
67-
timeout=config.timeout if config.timeout is not None else 30 # Use CLI timeout if provided
67+
timeout=config.timeout if config.timeout is not None else 1200 # Use CLI timeout if provided
6868
)
69-
print("loaded socket_config")
69+
log.debug("loaded socket_config")
7070
client = CliClient(socket_config)
71-
print("loaded client")
71+
log.debug("loaded client")
7272
core = Core(socket_config, sdk)
73-
print("loaded core")
73+
log.debug("loaded core")
7474
# Load files - files defaults to "[]" in CliConfig
7575
try:
7676
files = json.loads(config.files) # Will always succeed with empty list by default

0 commit comments

Comments
 (0)