feat: Add reprocess command
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
transporthttp "gis/internal/transport/http"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
@@ -171,6 +172,12 @@ func (a *App) ExampleConsumer() *rabbitmq.Consumer {
|
||||
// Publisher returns the RabbitMQ publisher.
|
||||
func (a *App) Publisher() *rabbitmq.Publisher { return a.publisher }
|
||||
|
||||
// ReprocessDataset re-enqueues the processing job for the dataset with the given
|
||||
// id, restarting its asynchronous pipeline.
|
||||
func (a *App) ReprocessDataset(ctx context.Context, id uuid.UUID) (domain.Dataset, error) {
|
||||
return a.datasets.Reprocess(ctx, id)
|
||||
}
|
||||
|
||||
// Close releases all resources in reverse order of acquisition.
|
||||
func (a *App) Close() {
|
||||
if a.rabbit != nil {
|
||||
|
||||
Reference in New Issue
Block a user