mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-06 08:08:10 +08:00
Redis takes seconds, not milliseconds
This commit is contained in:
parent
3c2b8bcb15
commit
65a6ea4546
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ const markAccountIsActive = (accountId) => {
|
||||||
const client = PubsubConnector.broadcastClient();
|
const client = PubsubConnector.broadcastClient();
|
||||||
const key = ACTIVE_KEY_FOR(accountId);
|
const key = ACTIVE_KEY_FOR(accountId);
|
||||||
client.incrAsync(key).then((val) => {
|
client.incrAsync(key).then((val) => {
|
||||||
client.expireAsync(key, 5 * 60 * 1000); // 5 min
|
client.expireAsync(key, 5 * 60); // 5 min in seconds
|
||||||
if (val === 1) {
|
if (val === 1) {
|
||||||
PubsubConnector.notifyAccount(accountId, {
|
PubsubConnector.notifyAccount(accountId, {
|
||||||
type: MessageTypes.ACCOUNT_UPDATED,
|
type: MessageTypes.ACCOUNT_UPDATED,
|
||||||
|
|
Loading…
Reference in a new issue