v0.1.25 v0.1.25
Vernon Keenan 2021-01-19 17:44:51 -08:00
parent 9ecf742360
commit 89f6c0a13a
2 changed files with 7 additions and 1 deletions

View File

@ -41,6 +41,8 @@ type NewLeadWorkflowWrapper struct {
// NewLeadWorkflow is a Temporal workflow // NewLeadWorkflow is a Temporal workflow
func NewLeadWorkflow(ctx temporal_workflow.Context, w NewLeadWorkflowWrapper) error { //nolint:gocritic // don't care func NewLeadWorkflow(ctx temporal_workflow.Context, w NewLeadWorkflowWrapper) error { //nolint:gocritic // don't care
sugar.Info("rules.NewLeadWorkflow: 📥")
sugar.Debugf("rules.NewLeadWorkflow: wrapper: %v", w)
transferDetails := app.LeadActivityWrapper{ transferDetails := app.LeadActivityWrapper{
// Address: w.Address, // Address: w.Address,
Company: w.Company, Company: w.Company,
@ -76,13 +78,17 @@ func NewLeadWorkflow(ctx temporal_workflow.Context, w NewLeadWorkflowWrapper) er
RetryPolicy: retryPolicy, RetryPolicy: retryPolicy,
} }
ctx = temporal_workflow.WithActivityOptions(ctx, options) ctx = temporal_workflow.WithActivityOptions(ctx, options)
sugar.Debugf("rules.NewLeadWorkflow: ctx: %v", ctx)
sugar.Debugf("rules.NewLeadWorkflow: 📏 do Store", ctx)
err := temporal_workflow.ExecuteActivity(ctx, StoreLeadActivity, transferDetails).Get(ctx, nil) err := temporal_workflow.ExecuteActivity(ctx, StoreLeadActivity, transferDetails).Get(ctx, nil)
if err != nil { if err != nil {
return err return err
} }
sugar.Debugf("rules.NewLeadWorkflow: 📏 do Notify", ctx)
err = temporal_workflow.ExecuteActivity(ctx, NotifyLeadActivity, transferDetails).Get(ctx, nil) err = temporal_workflow.ExecuteActivity(ctx, NotifyLeadActivity, transferDetails).Get(ctx, nil)
if err != nil { if err != nil {
return err return err
} }
sugar.Info("rules.NewLeadWorkflow: 👍 📤")
return nil return nil
} }

View File

@ -21,7 +21,7 @@ const getTimeout = 6 * time.Minute
const postTimeout = 6 * time.Minute const postTimeout = 6 * time.Minute
const maxAttempts = 50 const maxAttempts = 50
var sugar = logger.New(zapcore.InfoLevel) var sugar = logger.New(zapcore.DebugLevel)
var crmClient = crm_client.Default var crmClient = crm_client.Default
var devopsClient = devops_client.Default var devopsClient = devops_client.Default