Skip to content

Commit

Permalink
feat: guaranteed publish command exec
Browse files Browse the repository at this point in the history
  • Loading branch information
其一 committed May 29, 2024
1 parent cb97915 commit c2782e0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ private boolean storeMappingStandalone(String key, String field, String value, S
Transaction transaction = jedis.multi();
transaction.hset(key, field, value);
List<Object> result = transaction.exec();
jedis.publish(buildPubSubKey(), field);
return null != result;
if (null != result) {
jedis.publish(buildPubSubKey(), field);
return true;
}
}
jedis.unwatch();
} catch (Throwable e) {
Expand Down

0 comments on commit c2782e0

Please sign in to comment.