MCPcopy
hub / github.com/apache/devlake / Run

Method Run

backend/server/services/blueprint.go:55–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53}
54
55func (bj BlueprintJob) Run() {
56 blueprint := bj.Blueprint
57 pipeline, err := createPipelineByBlueprint(blueprint, &blueprint.SyncPolicy)
58 if err == ErrEmptyPlan {
59 blueprintLog.Info("Empty plan, blueprint id:[%d] blueprint name:[%s]", blueprint.ID, blueprint.Name)
60 return
61 }
62 if err != nil {
63 blueprintLog.Error(err, fmt.Sprintf("run cron job failed on blueprint:[%d][%s]", blueprint.ID, blueprint.Name))
64 } else {
65 blueprintLog.Info("Run new cron job successfully,blueprint id:[%d] pipeline id:[%d]", blueprint.ID, pipeline.ID)
66 }
67}
68
69// CreateBlueprint accepts a Blueprint instance and insert it to database
70func CreateBlueprint(blueprint *models.Blueprint) errors.Error {

Callers 15

TestEncodeFunction · 0.80
TestRandLetterBytesFunction · 0.80
TestSanitizeStringFunction · 0.80
TestNilIfZeroTimeFunction · 0.80
Test_addLocalFunction · 0.80
TestCrdbErrorImplFunction · 0.80
TestIsFunction · 0.80
TestPipelinePlan_IsEmptyFunction · 0.80
TestIso8601Time_ValueFunction · 0.80
TestIso8601Time_ScanFunction · 0.80
TestConvertStringToTimeFunction · 0.80
TestIsNonDateStringFunction · 0.80

Calls 3

InfoMethod · 0.65
ErrorMethod · 0.65

Tested by 15

TestEncodeFunction · 0.64
TestRandLetterBytesFunction · 0.64
TestSanitizeStringFunction · 0.64
TestNilIfZeroTimeFunction · 0.64
Test_addLocalFunction · 0.64
TestCrdbErrorImplFunction · 0.64
TestIsFunction · 0.64
TestPipelinePlan_IsEmptyFunction · 0.64
TestIso8601Time_ValueFunction · 0.64
TestIso8601Time_ScanFunction · 0.64
TestConvertStringToTimeFunction · 0.64
TestIsNonDateStringFunction · 0.64