File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 11import argparse
22import json
3- import os
43from datetime import datetime
54from functools import partial
65from pathlib import Path
109from jose import jwt
1110from workflows .transport .pika_transport import PikaTransport
1211
12+ from murfey .util .config import security_from_file
13+
1314
1415def dlq_purge (
1516 dlq_dump_path : Path , queue : str , rabbitmq_credentials : Path
@@ -133,11 +134,8 @@ def run():
133134 )
134135 args = parser .parse_args ()
135136
136- # Set the environment variable then read it by importing the security config
137- os .environ ["MURFEY_SECURITY_CONFIGURATION" ] = args .config
138- from murfey .util .config import get_security_config
139-
140- security_config = get_security_config ()
137+ # Read the security config file
138+ security_config = security_from_file (args .config )
141139
142140 # Get the token to post to the api with
143141 token = jwt .encode (
Original file line number Diff line number Diff line change 11import json
2- import os
32
43import pytest
54from sqlmodel import Session
@@ -35,4 +34,3 @@ def mock_security_configuration(tmp_path):
3534 }
3635 with open (config_file , "w" ) as f :
3736 json .dump (security_config , f )
38- os .environ ["MURFEY_SECURITY_CONFIGURATION" ] = str (config_file )
You can’t perform that action at this time.
0 commit comments