File tree 1 file changed +1
-30
lines changed
1 file changed +1
-30
lines changed Original file line number Diff line number Diff line change @@ -956,36 +956,7 @@ taskmanager.rerunTask = function(options, callback) {
956
956
} ;
957
957
958
958
taskmanager . stopTask = function ( options , callback ) {
959
- options . db = options . db || common . db ;
960
-
961
- /**
962
- * Stop task
963
- * @param {funciton } callback1 - callback for the result
964
- */
965
- function stopTask ( ) {
966
- callback ( null , "Operation could not be stopped" ) ;
967
- }
968
-
969
- options . db . collection ( "long_tasks" ) . findOne ( { _id : options . id } , function ( err , res ) {
970
- if ( res ) {
971
- if ( res . creator ) {
972
- options . db . collection ( "members" ) . findOne ( { _id : common . db . ObjectID ( res . creator ) } , function ( err1 , member ) {
973
- if ( member ) {
974
- stopTask ( res . op_id ) ;
975
- }
976
- else {
977
- callback ( null , "No permission to stop this task" ) ;
978
- }
979
- } ) ;
980
- }
981
- else {
982
- stopTask ( res . op_id ) ;
983
- }
984
- }
985
- else {
986
- callback ( null , "Task does not exist" ) ;
987
- }
988
- } ) ;
959
+ callback ( null , "Operation could not be stopped" ) ;
989
960
} ;
990
961
991
962
/**
You can’t perform that action at this time.
0 commit comments