Capture os signals to gracefully shutdown fission components (#2261)
- Currently, fission components don't handle shutdown signals. So we don't get any to do the required cleanup before the fission process exits. Adding signal capture process with cancelling context so that all dependent processes stop working when the process gets term signal. - Set log level to error in otel shutdown function Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -16,6 +16,7 @@ limitations under the License.
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
@@ -49,7 +50,8 @@ func eventCommandHandler(cmd *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return tracker.Tracker.SendEvent(event)
|
||||
ctx := context.Background()
|
||||
return tracker.Tracker.SendEvent(ctx, event)
|
||||
}
|
||||
|
||||
//EventCommand reports an event to analytics
|
||||
|
||||
Reference in New Issue
Block a user