This commit is contained in:
parent
24f6e7b563
commit
c3865d5fbb
@ -4,8 +4,8 @@ def tor_processor(self):
|
|||||||
"""
|
"""
|
||||||
for canidate in self.tracker_list:
|
for canidate in self.tracker_list:
|
||||||
if self.enable_telemetry:
|
if self.enable_telemetry:
|
||||||
header = ['state','ratio','tags','added','age','time','thash','tname','trname']
|
header = ['state','ratio','tags','added','hash','name','tracker']
|
||||||
row = [canidate['state'],canidate['ratio'],canidate["tags"],canidate['added_on'],self.age,self.t.time(),canidate['infohash_v1'],canidate["name"][0:20],canidate['tracker']]
|
row = [canidate['state'],canidate['ratio'],canidate["tags"],canidate['added_on'],canidate['infohash_v1'],canidate["name"][0:20],canidate['tracker']]
|
||||||
write_csv(self.cv,self.telemetry_outfile,header,row)
|
write_csv(self.cv,self.telemetry_outfile,header,row)
|
||||||
if self.use_log:
|
if self.use_log:
|
||||||
self.tl.debug(f'---Reviewing canidate: ["{canidate["name"][0:20]}..."] {canidate["infohash_v1"]}---')
|
self.tl.debug(f'---Reviewing canidate: ["{canidate["name"][0:20]}..."] {canidate["infohash_v1"]}---')
|
||||||
@ -34,8 +34,8 @@ def tor_processor(self):
|
|||||||
self.tl.info(f'Submitted ["{canidate["name"][0:20]}..."] for deletion.')
|
self.tl.info(f'Submitted ["{canidate["name"][0:20]}..."] for deletion.')
|
||||||
else:
|
else:
|
||||||
if self.enable_dragnet:
|
if self.enable_dragnet:
|
||||||
header = ['state','ratio','tags','added','age','time','thash','tname','trname']
|
header = ['state','ratio','tags','added','thash','tname','trname']
|
||||||
row = [canidate['state'],canidate['ratio'],canidate["tags"],canidate['added_on'],self.age,self.t.time(),canidate['infohash_v1'],canidate["name"][0:20],canidate['tracker']]
|
row = [canidate['state'],canidate['ratio'],canidate["tags"],canidate['added_on'],canidate['infohash_v1'],canidate["name"][0:20],canidate['tracker']]
|
||||||
write_csv(self.cv,self.dragnet_outfile,header,row)
|
write_csv(self.cv,self.dragnet_outfile,header,row)
|
||||||
self.tl.info(f'["{canidate["name"][0:20]}..."] is orphaned.')
|
self.tl.info(f'["{canidate["name"][0:20]}..."] is orphaned.')
|
||||||
self.up_tor_counter += 1
|
self.up_tor_counter += 1
|
||||||
|
@ -29,13 +29,11 @@ class TestWriteCSV(unittest.TestCase):
|
|||||||
ratio = 1.05
|
ratio = 1.05
|
||||||
tags = 'ipt'
|
tags = 'ipt'
|
||||||
added = 1
|
added = 1
|
||||||
age = 240000
|
|
||||||
time = 123456
|
|
||||||
thash = 'asfasdf23412adfqwer'
|
thash = 'asfasdf23412adfqwer'
|
||||||
tname = 'thisismynamehahahah'
|
tname = 'thisismynamehahahah'
|
||||||
trname = 'https://localhost.stackoverflow.tech/317332f1c125bc9c1b9b14fb8e054908/announce'
|
trname = 'https://localhost.stackoverflow.tech/317332f1c125bc9c1b9b14fb8e054908/announce'
|
||||||
header = ['state','ratio','tags','added','age','time','thash','tname','trname']
|
header = ['state','ratio','tags','added','hash','name','tracker']
|
||||||
row = [state,ratio,tags,added,age,time,thash,tname,trname]
|
row = [state,ratio,tags,added,thash,tname,trname]
|
||||||
write_csv(self.cv,outfile,header,row)
|
write_csv(self.cv,outfile,header,row)
|
||||||
self.assertTrue(os.path.exists(outfile))
|
self.assertTrue(os.path.exists(outfile))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user