diff --git a/turbinia/client.py b/turbinia/client.py index e5a37969c..2128b60e5 100644 --- a/turbinia/client.py +++ b/turbinia/client.py @@ -324,7 +324,7 @@ def wait_for_request( log.info('All {0:d} Tasks completed'.format(len(task_results))) def get_task_data( - self, instance, project, region, days=1000, task_id=None, request_id=None, + self, instance, project, region, days=0, task_id=None, request_id=None, user=None, function_name='gettasks'): """Gets task data from Google Cloud Functions. @@ -609,7 +609,7 @@ def format_task_statistics( return '\n'.join(report) def format_task_status( - self, instance, project, region, days=1000, task_id=None, request_id=None, + self, instance, project, region, days=0, task_id=None, request_id=None, user=None, all_fields=False, full_report=False, priority_filter=Priority.HIGH): """Formats the recent history for Turbinia Tasks. diff --git a/turbinia/state_manager.py b/turbinia/state_manager.py index 5fef4c3d2..c85dd98e4 100644 --- a/turbinia/state_manager.py +++ b/turbinia/state_manager.py @@ -123,6 +123,8 @@ def get_task_dict(self, task): # TODO(aarontp): Migrate this to actual Datastore namespaces config.LoadConfig() task_dict.update({'instance': config.INSTANCE_ID}) + if isinstance(task_dict['instance'], six.binary_type): + task_dict['instance'] = codecs.decode(task_dict['instance'], 'utf-8') return task_dict def _validate_data(self, data): diff --git a/turbinia/turbiniactl.py b/turbinia/turbiniactl.py index 29faaa6eb..d538e4149 100644 --- a/turbinia/turbiniactl.py +++ b/turbinia/turbiniactl.py @@ -335,7 +335,7 @@ def main(): help='When used with --statistics, the output will be in CSV format', required=False) parser_status.add_argument( - '-d', '--days_history', default=1000, type=int, + '-d', '--days_history', default=0, type=int, help='Number of days of history to show', required=False) parser_status.add_argument( '-f', '--force', help='Gatekeeper for --close_tasks', action='store_true',