From 89f6c0a13a3862c7dcec950da6edcdc252cba7ff Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Tue, 19 Jan 2021 17:44:51 -0800 Subject: [PATCH] debug --- rules/new-lead.go | 6 ++++++ rules/root.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/rules/new-lead.go b/rules/new-lead.go index b7bea4b..4a1692e 100644 --- a/rules/new-lead.go +++ b/rules/new-lead.go @@ -41,6 +41,8 @@ type NewLeadWorkflowWrapper struct { // NewLeadWorkflow is a Temporal workflow 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{ // Address: w.Address, Company: w.Company, @@ -76,13 +78,17 @@ func NewLeadWorkflow(ctx temporal_workflow.Context, w NewLeadWorkflowWrapper) er RetryPolicy: retryPolicy, } 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) if err != nil { return err } + sugar.Debugf("rules.NewLeadWorkflow: 📏 do Notify", ctx) err = temporal_workflow.ExecuteActivity(ctx, NotifyLeadActivity, transferDetails).Get(ctx, nil) if err != nil { return err } + sugar.Info("rules.NewLeadWorkflow: 👍 📤") return nil } diff --git a/rules/root.go b/rules/root.go index b433c68..795bdac 100644 --- a/rules/root.go +++ b/rules/root.go @@ -21,7 +21,7 @@ const getTimeout = 6 * time.Minute const postTimeout = 6 * time.Minute const maxAttempts = 50 -var sugar = logger.New(zapcore.InfoLevel) +var sugar = logger.New(zapcore.DebugLevel) var crmClient = crm_client.Default var devopsClient = devops_client.Default