|
@@ -1,6 +1,7 @@
|
|
package cn.com.qmth.examcloud.web.helpers;
|
|
package cn.com.qmth.examcloud.web.helpers;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.assertj.core.util.Arrays;
|
|
import org.assertj.core.util.Arrays;
|
|
@@ -76,7 +77,7 @@ public class SequenceLockHelper {
|
|
*/
|
|
*/
|
|
public static void releaseLock(Object... args) {
|
|
public static void releaseLock(Object... args) {
|
|
String key = LOCK_PREFIX + StringUtils.join(Arrays.asList(args), "_");
|
|
String key = LOCK_PREFIX + StringUtils.join(Arrays.asList(args), "_");
|
|
- getRedisClient().expire(key, 1);
|
|
|
|
|
|
+ getRedisClient().expire((String) key, 100, TimeUnit.MILLISECONDS);
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
List<String> keyList = (List<String>) ServletUtil.getRequest()
|
|
List<String> keyList = (List<String>) ServletUtil.getRequest()
|
|
.getAttribute(HttpServletRequestAttribute.$_CUSTOM_SEQUENCE_LOCK.name());
|
|
.getAttribute(HttpServletRequestAttribute.$_CUSTOM_SEQUENCE_LOCK.name());
|