Skip to content

Commit

Permalink
Fix cache patch
Browse files Browse the repository at this point in the history
  • Loading branch information
guimard committed Apr 3, 2024
1 parent 3d5c572 commit 0c6cb23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changes

* 2024-04-03: fix cache patch
* 2024-03-27: add missing Jitsi/logout method
* 2024-03-20: add PGSSLCERT=/tmp/postgres.crt
* 2024-03-13: add patch to workaround local cache failures
Expand Down
5 changes: 3 additions & 2 deletions base-no-s6/no-cache-fail.patch
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}

unless ($session->{args}->{updateCache}
@@ -120,4 +127,16 @@ sub cache {
@@ -120,4 +127,17 @@ sub cache {
return $self->{cache};
}

Expand All @@ -91,8 +91,9 @@
+
+sub _cache_call {
+ my ( $sub, $self, @args ) = @_;
+ eval { $self->cache->$sub(@args); };
+ my $res = eval { $self->cache->$sub(@args); };
+ print STDERR "Unable to use cache: $@\n" if $@;
+ return $res;
+}
+
1;
5 changes: 3 additions & 2 deletions base/no-cache-fail.patch
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}

unless ($session->{args}->{updateCache}
@@ -120,4 +127,16 @@ sub cache {
@@ -120,4 +127,17 @@ sub cache {
return $self->{cache};
}

Expand All @@ -91,8 +91,9 @@
+
+sub _cache_call {
+ my ( $sub, $self, @args ) = @_;
+ eval { $self->cache->$sub(@args); };
+ my $res = eval { $self->cache->$sub(@args); };
+ print STDERR "Unable to use cache: $@\n" if $@;
+ return $res;
+}
+
1;

0 comments on commit 0c6cb23

Please sign in to comment.