@@ -174,7 +174,7 @@ def get_task(self, task_id: str) -> dict:
174
174
task_id (str): The ID of the stored task.
175
175
176
176
Returns:
177
- task_dict (dict): Dict containing task attributes.
177
+ task_dict (dict): Dict containing task attributes.
178
178
"""
179
179
task_key = ':' .join (('TurbiniaTask' , task_id ))
180
180
task_dict = {}
@@ -265,7 +265,7 @@ def get_task_data(
265
265
266
266
def update_request_task (self , task ) -> None :
267
267
"""Adds a Turbinia task to the corresponding request list.
268
-
268
+
269
269
Args:
270
270
task (TurbiniaTask): Turbinia task object.
271
271
"""
@@ -315,7 +315,9 @@ def write_new_task(self, task) -> Optional[str]:
315
315
Returns:
316
316
task_key Optional[str]: The key corresponding for the task.
317
317
"""
318
- log .info (f'Writing metadata for new task { task .name :s} with id { task .id :s} ' )
318
+ log .info (
319
+ f'Writing metadata for new task { task .name :s} with id { task .id :s} '
320
+ f'and request ID { task .request_id } ' )
319
321
try :
320
322
task_key = self .redis_client .build_key_name ('task' , task .id )
321
323
except ValueError as exception :
@@ -359,7 +361,7 @@ def update_task_helper(self, task) -> Dict[str, Any]:
359
361
360
362
def update_task (self , task ) -> Optional [str ]:
361
363
"""Updates a Turbinia task key.
362
-
364
+
363
365
Args:
364
366
task: A TurbiniaTask object.
365
367
@@ -400,7 +402,7 @@ def write_evidence(self, evidence_dict: dict[str]) -> str:
400
402
401
403
Returns:
402
404
evidence_key (str): The key corresponding to the evidence in Redis
403
-
405
+
404
406
Raises:
405
407
TurbiniaException: If the attribute deserialization fails.
406
408
"""
@@ -443,7 +445,7 @@ def get_evidence_data(self, evidence_id: str) -> dict:
443
445
evidence_id (str): The ID of the stored evidence.
444
446
445
447
Returns:
446
- evidence_dict (dict): Dict containing evidence attributes.
448
+ evidence_dict (dict): Dict containing evidence attributes.
447
449
"""
448
450
evidence_key = ':' .join (('TurbiniaEvidence' , evidence_id ))
449
451
evidence_dict = {}
@@ -462,7 +464,7 @@ def get_evidence_summary(
462
464
output (str): Output of the function (keys | content | count).
463
465
464
466
Returns:
465
- summary (dict | list | int): Object containing evidences.
467
+ summary (dict | list | int): Object containing evidences.
466
468
"""
467
469
if output == 'count' and not group :
468
470
return sum (1 for _ in self .redis_client .iterate_keys ('Evidence' ))
@@ -494,7 +496,7 @@ def query_evidence(
494
496
output (str): Output of the function (keys | content | count).
495
497
496
498
Returns:
497
- query_result (list | int): Result of the query.
499
+ query_result (list | int): Result of the query.
498
500
"""
499
501
keys = []
500
502
for evidence_key in self .redis_client .iterate_keys ('Evidence' ):
@@ -517,7 +519,7 @@ def get_evidence_key_by_hash(self, file_hash: str) -> str | None:
517
519
file_hash (str): The hash of the stored evidence.
518
520
519
521
Returns:
520
- key (str | None): Key of the stored evidence.
522
+ key (str | None): Key of the stored evidence.
521
523
"""
522
524
try :
523
525
if file_hash :
@@ -533,7 +535,7 @@ def get_evidence_by_hash(self, file_hash: str) -> dict:
533
535
file_hash (str): The hash of the stored evidence.
534
536
535
537
Returns:
536
- evidence_dict (dict): Dict containing evidence attributes.
538
+ evidence_dict (dict): Dict containing evidence attributes.
537
539
"""
538
540
evidence_id = self .get_evidence_key_by_hash (file_hash ).split (':' )[1 ]
539
541
return self .get_evidence_data (evidence_id )
@@ -544,12 +546,12 @@ def write_request(self, request_dict: dict, overwrite=False):
544
546
Args:
545
547
request_dict (dict[str]): A dictionary containing the serialized
546
548
request attributes that will be saved.
547
- overwrite (bool): Allows overwriting previous key and blocks writing new
549
+ overwrite (bool): Allows overwriting previous key and blocks writing new
548
550
ones.
549
551
550
552
Returns:
551
553
request_key (str): The key corresponding to the evidence in Redis
552
-
554
+
553
555
Raises:
554
556
TurbiniaException: If the attribute deserialization fails or tried to
555
557
overwrite an existing key without overwrite=True
@@ -589,7 +591,7 @@ def get_request_data(self, request_id: str) -> dict:
589
591
request_id (str): The ID of the stored request.
590
592
591
593
Returns:
592
- request_dict (dict): Dict containing request attributes.
594
+ request_dict (dict): Dict containing request attributes.
593
595
"""
594
596
request_key = self .redis_client .build_key_name ('request' , request_id )
595
597
request_dict = {}
@@ -637,7 +639,7 @@ def query_requests(
637
639
output (str): Output of the function (keys | content | count).
638
640
639
641
Returns:
640
- query_result (list | int): Result of the query.
642
+ query_result (list | int): Result of the query.
641
643
"""
642
644
keys = []
643
645
for request_key in self .redis_client .iterate_keys ('request' ):
0 commit comments