diff --git a/assets/vue/ProposedPatterns.vue b/assets/vue/ProposedPatterns.vue
index a295c299b..c14447573 100644
--- a/assets/vue/ProposedPatterns.vue
+++ b/assets/vue/ProposedPatterns.vue
@@ -96,7 +96,7 @@
Proposal has been removed
@@ -125,7 +125,7 @@ export default {
name: 'RecentChanges',
data() {
return {
- params: {before: 0},
+ params: {before: 0, delay: 600},
changes: null,
changeUrl: '/licenses/proposed/meta',
total: null
diff --git a/lib/Cavil/Controller/Snippet.pm b/lib/Cavil/Controller/Snippet.pm
index cabe12582..3ae15f241 100644
--- a/lib/Cavil/Controller/Snippet.pm
+++ b/lib/Cavil/Controller/Snippet.pm
@@ -174,11 +174,13 @@ sub _create_pattern ($self, $packages, $validation) {
$validation->optional('trademark');
$validation->optional('export_restricted');
$validation->optional('contributor');
+ $validation->optional('delay')->num;
return $self->reply->json_validation_error if $validation->has_error;
my $owner_id = $self->users->id_for_login($self->current_user);
my $contributor = $validation->param('contributor');
my $contributor_id = $contributor ? $self->users->id_for_login($contributor) : undef;
+ my $delay = $validation->param('delay') // 0;
my $patterns = $self->patterns;
my $pattern = $patterns->create(
@@ -195,7 +197,7 @@ sub _create_pattern ($self, $packages, $validation) {
return $self->render(status => 409, error => 'Conflicting license pattern already exists') if $pattern->{conflict};
if (my $checksum = $validation->param('checksum')) { $patterns->remove_proposal($checksum) }
- $self->packages->reindex($_, 3) for @$packages;
+ $self->packages->reindex($_, 3, [], $delay) for @$packages;
$self->render(packages => $packages, pattern => $pattern->{id});
}