Hello community,
here is the log from the commit of package perl-Minion-Backend-SQLite for openSUSE:Factory checked in at 2019-08-09 16:55:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Minion-Backend-SQLite (Old)
and /work/SRC/openSUSE:Factory/.perl-Minion-Backend-SQLite.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Minion-Backend-SQLite"
Fri Aug 9 16:55:01 2019 rev:4 rq:721973 version:4.005
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Minion-Backend-SQLite/perl-Minion-Backend-SQLite.changes 2019-07-17 14:27:23.263321159 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Minion-Backend-SQLite.new.9556/perl-Minion-Backend-SQLite.changes 2019-08-09 16:55:01.917445002 +0200
@@ -1,0 +2,9 @@
+Tue Aug 6 05:14:29 UTC 2019 - Stephan Kulow
+
+- updated to 4.005
+ see /usr/share/doc/packages/perl-Minion-Backend-SQLite/Changes
+
+ 4.005 2019-08-05 11:00:01 EDT
+ - Allow fields to be removed with note method.
+
+-------------------------------------------------------------------
Old:
----
Minion-Backend-SQLite-4.004.tar.gz
New:
----
Minion-Backend-SQLite-4.005.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Minion-Backend-SQLite.spec ++++++
--- /var/tmp/diff_new_pack.4P1vn8/_old 2019-08-09 16:55:02.289444913 +0200
+++ /var/tmp/diff_new_pack.4P1vn8/_new 2019-08-09 16:55:02.289444913 +0200
@@ -17,7 +17,7 @@
Name: perl-Minion-Backend-SQLite
-Version: 4.004
+Version: 4.005
Release: 0
%define cpan_name Minion-Backend-SQLite
Summary: SQLite backend for Minion job queue
++++++ Minion-Backend-SQLite-4.004.tar.gz -> Minion-Backend-SQLite-4.005.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-Backend-SQLite-4.004/Build.PL new/Minion-Backend-SQLite-4.005/Build.PL
--- old/Minion-Backend-SQLite-4.004/Build.PL 2019-07-09 06:53:22.000000000 +0200
+++ new/Minion-Backend-SQLite-4.005/Build.PL 2019-08-05 17:00:04.000000000 +0200
@@ -84,7 +84,7 @@
"Dan Book "
],
"dist_name" => "Minion-Backend-SQLite",
- "dist_version" => "4.004",
+ "dist_version" => "4.005",
"license" => "artistic_2",
"module_name" => "Minion::Backend::SQLite",
"recursive_test_files" => 1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-Backend-SQLite-4.004/Changes new/Minion-Backend-SQLite-4.005/Changes
--- old/Minion-Backend-SQLite-4.004/Changes 2019-07-09 06:53:22.000000000 +0200
+++ new/Minion-Backend-SQLite-4.005/Changes 2019-08-05 17:00:04.000000000 +0200
@@ -1,3 +1,6 @@
+4.005 2019-08-05 11:00:01 EDT
+ - Allow fields to be removed with note method.
+
4.004 2019-07-09 00:53:20 EDT
- Add time field to list_jobs method.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-Backend-SQLite-4.004/META.json new/Minion-Backend-SQLite-4.005/META.json
--- old/Minion-Backend-SQLite-4.004/META.json 2019-07-09 06:53:22.000000000 +0200
+++ new/Minion-Backend-SQLite-4.005/META.json 2019-08-05 17:00:04.000000000 +0200
@@ -64,7 +64,7 @@
"provides" : {
"Minion::Backend::SQLite" : {
"file" : "lib/Minion/Backend/SQLite.pm",
- "version" : "4.004"
+ "version" : "4.005"
}
},
"release_status" : "stable",
@@ -80,7 +80,7 @@
},
"x_IRC" : "irc://irc.freenode.net/#mojo"
},
- "version" : "4.004",
+ "version" : "4.005",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.030000"
@@ -274,7 +274,7 @@
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
- "tag" : "4.004",
+ "tag" : "4.005",
"tag_format" : "%v",
"tag_message" : "%v"
},
@@ -602,6 +602,6 @@
"yrjustice <43676784+yrjustice@users.noreply.github.com>"
],
"x_generated_by_perl" : "v5.30.0",
- "x_serialization_backend" : "Cpanel::JSON::XS version 4.11"
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.12"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-Backend-SQLite-4.004/META.yml new/Minion-Backend-SQLite-4.005/META.yml
--- old/Minion-Backend-SQLite-4.004/META.yml 2019-07-09 06:53:22.000000000 +0200
+++ new/Minion-Backend-SQLite-4.005/META.yml 2019-08-05 17:00:04.000000000 +0200
@@ -26,7 +26,7 @@
provides:
Minion::Backend::SQLite:
file: lib/Minion/Backend/SQLite.pm
- version: '4.004'
+ version: '4.005'
requires:
List::Util: '0'
Minion: '9.0'
@@ -40,7 +40,7 @@
bugtracker: https://github.com/Grinnz/Minion-Backend-SQLite/issues
homepage: https://github.com/Grinnz/Minion-Backend-SQLite
repository: https://github.com/Grinnz/Minion-Backend-SQLite.git
-version: '4.004'
+version: '4.005'
x_Dist_Zilla:
perl:
version: '5.030000'
@@ -190,7 +190,7 @@
branch: ~
changelog: Changes
signed: 0
- tag: '4.004'
+ tag: '4.005'
tag_format: '%v'
tag_message: '%v'
Dist::Zilla::Role::Git::Repo:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-Backend-SQLite-4.004/lib/Minion/Backend/SQLite.pm new/Minion-Backend-SQLite-4.005/lib/Minion/Backend/SQLite.pm
--- old/Minion-Backend-SQLite-4.004/lib/Minion/Backend/SQLite.pm 2019-07-09 06:53:22.000000000 +0200
+++ new/Minion-Backend-SQLite-4.005/lib/Minion/Backend/SQLite.pm 2019-08-05 17:00:04.000000000 +0200
@@ -8,7 +8,7 @@
use Sys::Hostname 'hostname';
use Time::HiRes 'usleep';
-our $VERSION = '4.004';
+our $VERSION = '4.005';
has dequeue_interval => 0.5;
has 'sqlite';
@@ -108,6 +108,9 @@
push @where, @$ids ? "id in ($ids_in)" : 'id is null';
push @where_params, @$ids;
}
+ if (defined(my $notes = $options->{notes})) {
+ croak 'Listing jobs by existence of notes is unimplemented';
+ }
if (defined(my $queues = $options->{queues})) {
my $queues_in = join ',', ('?')x@$queues;
push @where, @$queues ? "queue in ($queues_in)" : 'queue is null';
@@ -219,17 +222,26 @@
sub note {
my ($self, $id, $merge) = @_;
- my (@set, @set_params);
+ my (@set, @set_params, @remove, @remove_params);
foreach my $key (keys %$merge) {
croak qq{Invalid note key '$key'; must not contain '.', '[', or ']'}
if $key =~ m/[\[\].]/;
- push @set, q{'$.' || ?}, 'json(?)';
- push @set_params, $key, {json => $merge->{$key}};
+ if (defined $merge->{$key}) {
+ push @set, q{'$.' || ?}, 'json(?)';
+ push @set_params, $key, {json => $merge->{$key}};
+ } else {
+ push @remove, q{'$.' || ?};
+ push @remove_params, $key;
+ }
}
my $json_set = join ', ', @set;
+ my $json_remove = join ', ', @remove;
+ my $set_to = 'notes';
+ $set_to = "json_set($set_to, $json_set)" if @set;
+ $set_to = "json_remove($set_to, $json_remove)" if @remove;
return !!$self->sqlite->db->query(
- qq{update minion_jobs set notes = json_set(notes, $json_set)
- where id = ?}, @set_params, $id
+ qq{update minion_jobs set notes = $set_to where id = ?},
+ @set_params, @remove_params, $id
)->rows;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Minion-Backend-SQLite-4.004/t/sqlite.t new/Minion-Backend-SQLite-4.005/t/sqlite.t
--- old/Minion-Backend-SQLite-4.004/t/sqlite.t 2019-07-09 06:53:22.000000000 +0200
+++ new/Minion-Backend-SQLite-4.005/t/sqlite.t 2019-08-05 17:00:04.000000000 +0200
@@ -404,6 +404,13 @@
is $batch->[2]{queue}, 'default', 'right queue';
is $batch->[3]{queue}, 'default', 'right queue';
ok !$batch->[4], 'no more results';
+TODO: { todo_skip 'filtering jobs by notes not yet implemented', 3;
+ $id2 = $minion->enqueue('test' => [] => {notes => {is_test => 1}});
+ $batch = $minion->backend->list_jobs(0, 10, {notes => ['is_test']})->{jobs};
+ is $batch->[0]{task}, 'test', 'right task';
+ ok !$batch->[4], 'no more results';
+ ok $minion->job($id2)->remove, 'job removed';
+}
$batch
= $minion->backend->list_jobs(0, 10, {queues => ['does_not_exist']})->{jobs};
is_deeply $batch, [], 'no results';
@@ -674,7 +681,7 @@
$worker->unregister;
} # end SKIP
-SKIP: { skip 'Minion workers do not support fork emulation', 5 if HAS_PSEUDOFORK;
+SKIP: { skip 'Minion workers do not support fork emulation', 7 if HAS_PSEUDOFORK;
# Nested data structures
$minion->add_task(
nested => sub {
@@ -702,6 +709,9 @@
};
is_deeply $job->info->{notes}, $notes, 'right metadata';
is_deeply $job->info->{result}, [{23 => 'testtesttest'}], 'right structure';
+ok $job->note(yada => undef, bar => undef), 'removed metadata';
+$notes = {foo => [4, 5, 6], baz => 'yada'};
+is_deeply $job->info->{notes}, $notes, 'right metadata';
$worker->unregister;
} # end SKIP