mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Implement graceful shutdown of agent.DataAccess (#1008)
* Implements graceful shutdown of agent.DataAccess and underlying Datastore/Logstore/MessageQueue * adds tests for closing agent.DataAccess and Datastore
This commit is contained in:
@@ -192,3 +192,9 @@ func (mq *MemoryMQ) Delete(ctx context.Context, job *models.Call) error {
|
||||
log.Debugln("Deleted")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close stops the associated goroutines by stopping the ticker
|
||||
func (mq *MemoryMQ) Close() error {
|
||||
mq.Ticker.Stop()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user