parent
9ecf742360
commit
89f6c0a13a
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue