Module Expr Str ImportFrom alias alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body ImportFrom alias TryExcept body If Call AttributeLoad NameLoad attr body Return Call NameLoad NameLoad If CompareNotIn Str NameLoad body Return NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Return AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias Assign NameStore TupleLoad TupleLoad NameLoad Str TupleLoad NameLoad Str TupleLoad NameLoad Str TupleLoad NameLoad Str Assign NameStore TupleLoad TupleLoad NameLoad Str TupleLoad NameLoad Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword Num attr Assign NameStore NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Raise Call AttributeLoad NameLoad attr orelse If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad For TupleStore NameStore NameStore NameLoad body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword BoolOpOr NameLoad Str Expr Call AttributeLoad Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad Call NameLoad keyword NameLoad keyword Str keyword Call NameLoad NameLoad Num keyword NameLoad attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword BoolOpOr NameLoad Str Expr Call AttributeLoad Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad attr decorator_list Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad keyword NameLoad keyword Str Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Num keyword NameLoad keyword Str Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword NameLoad keyword Str NameLoad FunctionDef arguments args NameParam defaults NameLoad body Expr Str ImportFrom alias alias alias If NameLoad body ImportFrom alias orelse ImportFrom alias identifier Assign NameStore BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad For NameStore Call NameLoad NameLoad body If Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr body Continue If Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr body Continue Expr Call AttributeLoad NameLoad attr decorator_list
N/A N/A 
sentry.runner.commands.cleanup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
 __future__ absolute_import print_function N/A click datetime timedelta django.utils timezone sentry.runner.decorators configuration get_project N/A N/A value N/A N/A sentry.models Project N/A N/A N/A N/A N/A value isdigit N/A N/A N/A int value N/A N/A / value N/A N/A None N/A N/A org proj N/A N/A value split / 1 N/A N/A N/A N/A N/A Project objects get_from_cache organization__slug org slug proj id N/A N/A N/A N/A Project DoesNotExist N/A N/A None N/A cleanup N/A N/A days project concurrency silent N/A N/A N/A Delete a portion of trailing data based on creation date.

    All data that is older than `--days` will be deleted.  The default for
    this is 30 days.  In the default setting all projects will be truncated
    but if you have a specific project you want to limit this to this can be
    done with the `--project` flag which accepts a project ID or a string
    with the form `org/project` where both are slugs.
     sentry.app nodestore sentry.db.deletion BulkDeleteQuery sentry.models Event EventMapping Group GroupRuleStatus GroupTagValue LostPasswordHash TagValue GroupEmailThread N/A BULK_DELETES N/A N/A GroupRuleStatus date_added N/A GroupTagValue last_seen N/A TagValue last_seen N/A GroupEmailThread date N/A GENERIC_DELETES N/A N/A Event datetime N/A Group last_seen N/A N/A silent N/A N/A N/A N/A click echo Removing expired values for LostPasswordHash N/A N/A N/A N/A N/A N/A LostPasswordHash objects filter date_added__lte N/A N/A N/A timezone now N/A timedelta hours 48 delete N/A project_id None N/A project N/A N/A N/A N/A click echo Bulk NodeStore deletion not available for project selection err True N/A project_id N/A get_project project N/A N/A project_id None N/A N/A N/A N/A click echo Error: Project not found err True N/A N/A N/A click Abort N/A N/A N/A silent N/A N/A N/A N/A click echo Removing old NodeStore values N/A cutoff N/A N/A N/A timezone now N/A timedelta days days N/A N/A N/A N/A N/A nodestore cleanup cutoff N/A N/A N/A NotImplementedError N/A N/A N/A N/A click echo NodeStore backend does not support cleanup operation err True N/A N/A model dtfield BULK_DELETES N/A N/A N/A silent N/A N/A N/A N/A click echo N/A N/A Removing {model} for days={days} project={project} format model N/A model __name__ days days project N/A project * N/A N/A N/A N/A BulkDeleteQuery model model dtfield dtfield days days project_id project_id execute N/A N/A silent N/A N/A N/A N/A click echo Removing expired values for EventMapping N/A N/A N/A N/A BulkDeleteQuery model EventMapping dtfield date_added days N/A min days 7 project_id project_id execute N/A N/A silent N/A N/A N/A N/A click echo Cleaning up unused FileBlob references N/A N/A cleanup_unused_files silent N/A N/A model dtfield GENERIC_DELETES N/A N/A N/A silent N/A N/A N/A N/A click echo N/A N/A Removing {model} for days={days} project={project} format model N/A model __name__ days days project N/A project * N/A N/A N/A N/A BulkDeleteQuery model model dtfield dtfield days days project_id project_id execute_generic N/A N/A N/A click command N/A N/A click option --days default 30 type int show_default True help Numbers of days to truncate on. N/A N/A click option --project help Limit truncation to only entries from project. N/A N/A click option --concurrency type int default 1 show_default True help The number of concurrent workers to run. N/A N/A click option --silent -q default False is_flag True help Run quietly. No output on success. configuration cleanup_unused_files N/A N/A quiet N/A False N/A N/A 
    Remove FileBlob's (and thus the actual files) if they are no longer
    referenced by any File.

    We set a minimum-age on the query to ensure that we don't try to remove
    any blobs which are brand new and potentially in the process of being
    referenced.
     sentry.models File FileBlob FileBlobIndex N/A quiet N/A sentry.utils.query RangeQuerySetWrapper N/A sentry.utils.query RangeQuerySetWrapperWithProgressBar RangeQuerySetWrapper N/A cutoff N/A N/A N/A timezone now N/A timedelta days 1 N/A queryset N/A N/A N/A FileBlob objects filter timestamp__lte cutoff N/A blob N/A RangeQuerySetWrapper queryset N/A N/A N/A N/A N/A N/A N/A FileBlobIndex objects filter blob blob exists N/A N/A N/A N/A N/A N/A N/A N/A File objects filter blob blob exists N/A N/A N/A N/A N/A blob delete N/A