• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

trydofor / professional-wings / #140

08 Feb 2025 09:13AM UTC coverage: 63.606% (-0.08%) from 63.687%
#140

push

web-flow
Merge pull request #316 from trydofor/develop

release of 3.3.140

242 of 343 new or added lines in 58 files covered. (70.55%)

55 existing lines in 6 files now uncovered.

12926 of 20322 relevant lines covered (63.61%)

0.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

14.29
/radiant/tiny-task/src/main/java/pro/fessional/wings/tiny/task/controller/TaskExecController.java
1
package pro.fessional.wings.tiny.task.controller;
2

3
import io.swagger.v3.oas.annotations.Operation;
4
import lombok.Setter;
5
import org.springframework.beans.factory.annotation.Autowired;
6
import org.springframework.web.bind.annotation.PostMapping;
7
import org.springframework.web.bind.annotation.RequestBody;
8
import org.springframework.web.bind.annotation.ResponseBody;
9
import org.springframework.web.bind.annotation.RestController;
10
import pro.fessional.mirana.data.Q;
11
import pro.fessional.mirana.data.R;
12
import pro.fessional.wings.silencer.spring.boot.ConditionalWingsEnabled;
13
import pro.fessional.wings.tiny.task.service.TinyTaskExecService;
14
import pro.fessional.wings.tiny.task.spring.prop.TinyTaskEnabledProp;
15
import pro.fessional.wings.tiny.task.spring.prop.TinyTaskUrlmapProp;
16

17
/**
18
 * @author trydofor
19
 * @since 2022-12-26
20
 */
21
@RestController
22
@ConditionalWingsEnabled(abs = TinyTaskEnabledProp.Key$mvcExec)
23
public class TaskExecController {
1✔
24

25
    @Setter(onMethod_ = { @Autowired })
26
    protected TinyTaskExecService tinyTaskExecService;
27

28

29
    @Operation(summary = "cancel a task.")
30
    @PostMapping(value = "${" + TinyTaskUrlmapProp.Key$taskCancel + "}")
31
    @ResponseBody
32
    public R<Boolean> taskCancel(@RequestBody Q.Id ins) {
33
        final boolean cancel = tinyTaskExecService.cancel(ins.getId());
×
NEW
34
        return R.ok(cancel);
×
35
    }
36

37
    @Operation(summary = "start a task.")
38
    @PostMapping(value = "${" + TinyTaskUrlmapProp.Key$taskLaunch + "}")
39
    @ResponseBody
40
    public R<Boolean> taskLaunch(@RequestBody Q.Id ins) {
41
        final boolean cancel = tinyTaskExecService.launch(ins.getId());
×
NEW
42
        return R.ok(cancel);
×
43
    }
44

45
    @Operation(summary = "force to start a task.")
46
    @PostMapping(value = "${" + TinyTaskUrlmapProp.Key$taskForce + "}")
47
    @ResponseBody
48
    public R<Boolean> taskForce(@RequestBody Q.Id ins) {
49
        final boolean cancel = tinyTaskExecService.force(ins.getId());
×
NEW
50
        return R.ok(cancel);
×
51
    }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc