@@ -1653,7 +1653,11 @@ plugins.setConfigs("crashes", {
16531653 common . db . collection ( 'app_crashgroups' + params . qstring . app_id ) . remove ( { '_id' : group . _id } , function ( ) {
16541654 if ( common . drillDb ) {
16551655 common . drillDb . collection ( "drill_events" + crypto . createHash ( 'sha1' ) . update ( "[CLY]_crash" + params . qstring . app_id ) . digest ( 'hex' ) ) . remove ( { "sg.crash" : group . _id } , function ( ) { } ) ;
1656- common . drillDb . collection ( "drill_events" ) . remove ( { "a" : params . qstring . app_id + "" , e : "[CLY]_crash" , "sg.crash" : group . _id } , function ( ) { } ) ;
1656+ plugins . dispatch ( "/core/delete_granular_data" , {
1657+ db : "drill" ,
1658+ collection : "drill_events" ,
1659+ query : { a : params . qstring . app_id + "" , e : "[CLY]_crash" , "n" : group . _id + "" }
1660+ } ) ;
16571661 plugins . dispatch ( "/crash/delete" , { appId : params . qstring . app_id , crash : group . _id + "" } ) ;
16581662 }
16591663 var id = common . crypto . createHash ( 'sha1' ) . update ( params . qstring . app_id + group . _id + "" ) . digest ( 'hex' ) ;
@@ -1806,21 +1810,21 @@ plugins.setConfigs("crashes", {
18061810 common . db . collection ( 'app_crashes' + appId ) . drop ( function ( ) { } ) ;
18071811 common . db . collection ( 'crash_share' ) . remove ( { 'app_id' : appId } , function ( ) { } ) ;
18081812 common . db . collection ( 'crashdata' ) . remove ( { '_id' : { $regex : appId + ".*" } } , function ( ) { } ) ;
1809- if ( common . drillDb ) {
1813+ /* if (common.drillDb) {
18101814 common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_crash" + appId).digest('hex')).drop(function() {});
18111815 common.drillDb.collection("drill_events").remove({"a": appId + "", e: "[CLY]_crash"}, function() {});
1812- }
1816+ }*/
18131817 } ) ;
18141818
18151819 plugins . register ( "/i/apps/clear" , function ( ob ) {
18161820 var appId = ob . appId ;
18171821 var ids = ob . ids ;
18181822 common . db . collection ( 'crashdata' ) . remove ( { $and : [ { '_id' : { $regex : appId + ".*" } } , { '_id' : { $nin : ids } } ] } , function ( ) { } ) ;
18191823 common . db . collection ( 'app_crashes' + appId ) . remove ( { ts : { $lt : ob . moment . unix ( ) } } , function ( ) { } ) ;
1820- if ( common . drillDb ) {
1824+ /* if (common.drillDb) {
18211825 common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_crash" + appId).digest('hex')).remove({ts: {$lt: ob.moment.valueOf()}}, function() {});
18221826 common.drillDb.collection("drill_events").remove({a: appId + "", e: "[CLY]_crash", ts: {$lt: ob.moment.valueOf()}}, function() {});
1823- }
1827+ }*/
18241828 } ) ;
18251829
18261830 plugins . register ( "/i/apps/clear_all" , function ( ob ) {
@@ -1850,10 +1854,10 @@ plugins.setConfigs("crashes", {
18501854 } ) ;
18511855 common . db . collection ( 'crash_share' ) . remove ( { 'app_id' : appId } , function ( ) { } ) ;
18521856 common . db . collection ( 'crashdata' ) . remove ( { '_id' : { $regex : appId + ".*" } } , function ( ) { } ) ;
1853- if ( common . drillDb ) {
1857+ /* if (common.drillDb) {
18541858 common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_crash" + appId).digest('hex')).drop(function() {});
18551859 common.drillDb.collection("drill_events").remove({"a": appId + "", e: "[CLY]_crash"}, function() {});
1856- }
1860+ }*/
18571861 } ) ;
18581862
18591863 plugins . register ( "/i/apps/reset" , function ( ob ) {
@@ -1883,10 +1887,10 @@ plugins.setConfigs("crashes", {
18831887 } ) ;
18841888 common . db . collection ( 'crash_share' ) . remove ( { 'app_id' : appId } , function ( ) { } ) ;
18851889 common . db . collection ( 'crashdata' ) . remove ( { '_id' : { $regex : appId + ".*" } } , function ( ) { } ) ;
1886- if ( common . drillDb ) {
1887- common . drillDb . collection ( "drill_events" + crypto . createHash ( 'sha1' ) . update ( "[CLY]_crash" + appId ) . digest ( 'hex' ) ) . drop ( function ( ) { } ) ;
1888- common . drillDb . collection ( "drill_events" ) . remove ( { "a" : appId + "" , e : "[CLY]_crash" } , function ( ) { } ) ;
1889- }
1890+ /* if (common.drillDb) {
1891+ common.drillDb.collection("drill_events" + crypto.createHash('sha1').update("[CLY]_crash" + appId).digest('hex')).drop(function() {});
1892+ common.drillDb.collection("drill_events").remove({"a": appId + "", e: "[CLY]_crash"}, function() {});
1893+ }*/
18901894 } ) ;
18911895} ( plugin ) ) ;
18921896
0 commit comments