mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 14:38:53 +00:00
Always dispatch Redis messages on a task asynchronously
This commit is contained in:
1 parent
2fa959b9d8
commit
17af935379
2 files changed
+6
-4
No files matched your search
@@ -78,9 +78,11 @@ public class RedisBroker extends PluginMessageBroker {
|
||||
|
||||
@Override
|
||||
protected void send(@NotNull Message message, @NotNull OnlineUser sender) {
|
||||
try (Jedis jedis = jedisPool.getResource()) {
|
||||
jedis.publish(getSubChannelId(), plugin.getGson().toJson(message));
|
||||
}
|
||||
plugin.runAsync(() -> {
|
||||
try (Jedis jedis = jedisPool.getResource()) {
|
||||
jedis.publish(getSubChannelId(), plugin.getGson().toJson(message));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
||||
org.gradle.daemon=true
|
||||
javaVersion=16
|
||||
|
||||
plugin_version=4.0.5
|
||||
plugin_version=4.0.6
|
||||
plugin_archive=huskhomes
|
||||
|
||||
jedis_version=4.3.1
|
||||
|
||||
Reference in new issue
Block a user