mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-10 17:06:47 +00:00
remove unused container client from createTask
Signed-off-by: mohammadVatandoost <mohamadvatandoost512@gmail.com> Signed-off-by: Mohammad Vatandoost <mohamadvatandoost512@gmail.com>
This commit is contained in:
parent
4061b52b2a
commit
a574a0c06f
@ -175,7 +175,7 @@ func deploy(ctx context.Context, req types.FunctionDeployment, client *container
|
||||
return fmt.Errorf("unable to create container: %s, error: %w", name, err)
|
||||
}
|
||||
|
||||
return createTask(ctx, client, container, cni)
|
||||
return createTask(ctx, container, cni)
|
||||
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ func buildLabels(request *types.FunctionDeployment) (map[string]string, error) {
|
||||
return labels, nil
|
||||
}
|
||||
|
||||
func createTask(ctx context.Context, client *containerd.Client, container containerd.Container, cni gocni.CNI) error {
|
||||
func createTask(ctx context.Context, container containerd.Container, cni gocni.CNI) error {
|
||||
|
||||
name := container.ID()
|
||||
|
||||
|
@ -131,7 +131,7 @@ func MakeReplicaUpdateHandler(client *containerd.Client, cni gocni.CNI) func(w h
|
||||
}
|
||||
|
||||
if createNewTask {
|
||||
deployErr := createTask(ctx, client, ctr, cni)
|
||||
deployErr := createTask(ctx, ctr, cni)
|
||||
if deployErr != nil {
|
||||
log.Printf("[Scale] error deploying %s, error: %s\n", name, deployErr)
|
||||
http.Error(w, deployErr.Error(), http.StatusBadRequest)
|
||||
|
Loading…
x
Reference in New Issue
Block a user