mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
rename send scheduler to request scheduler
This commit is contained in:
parent
0a00d4c865
commit
5660e0f4f0
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
import {Room} from "./room/Room.js";
|
||||
import { ObservableMap } from "../observable/index.js";
|
||||
import {SendScheduler} from "./SendScheduler.js";
|
||||
import {RequestScheduler} from "./net/RequestScheduler.js";
|
||||
import {User} from "./User.js";
|
||||
import {DeviceMessageHandler} from "./DeviceMessageHandler.js";
|
||||
import {Account as E2EEAccount} from "./e2ee/Account.js";
|
||||
@ -45,8 +45,8 @@ export class Session {
|
||||
constructor({clock, storage, unwrappedHsApi, sessionInfo, olm, olmWorker, cryptoDriver, mediaRepository}) {
|
||||
this._clock = clock;
|
||||
this._storage = storage;
|
||||
this._sendScheduler = new SendScheduler({hsApi: unwrappedHsApi, clock});
|
||||
this._hsApi = this._sendScheduler.createHomeServerApiWrapper();
|
||||
this._requestScheduler = new RequestScheduler({hsApi: unwrappedHsApi, clock});
|
||||
this._hsApi = this._requestScheduler.createHomeServerApiWrapper();
|
||||
this._mediaRepository = mediaRepository;
|
||||
this._syncInfo = null;
|
||||
this._sessionInfo = sessionInfo;
|
||||
@ -268,12 +268,12 @@ export class Session {
|
||||
}
|
||||
|
||||
get isStarted() {
|
||||
return this._sendScheduler.isStarted;
|
||||
return this._requestScheduler.isStarted;
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this._olmWorker?.dispose();
|
||||
this._sendScheduler.stop();
|
||||
this._requestScheduler.stop();
|
||||
this._sessionBackup?.dispose();
|
||||
for (const room of this._rooms.values()) {
|
||||
room.dispose();
|
||||
@ -297,7 +297,7 @@ export class Session {
|
||||
const operations = await opsTxn.operations.getAll();
|
||||
const operationsByScope = groupBy(operations, o => o.scope);
|
||||
|
||||
this._sendScheduler.start();
|
||||
this._requestScheduler.start();
|
||||
for (const [, room] of this._rooms) {
|
||||
let roomOperationsByType;
|
||||
const roomOperations = operationsByScope.get(room.id);
|
||||
|
@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {AbortError} from "../utils/error.js";
|
||||
import {HomeServerError} from "./error.js";
|
||||
import {HomeServerApi} from "./net/HomeServerApi.js";
|
||||
import {ExponentialRetryDelay} from "./net/ExponentialRetryDelay.js";
|
||||
import {AbortError} from "../../utils/error.js";
|
||||
import {HomeServerError} from "../error.js";
|
||||
import {HomeServerApi} from "./HomeServerApi.js";
|
||||
import {ExponentialRetryDelay} from "./ExponentialRetryDelay.js";
|
||||
|
||||
class Request {
|
||||
constructor(methodName, args) {
|
||||
@ -58,7 +58,7 @@ for (const methodName of Object.getOwnPropertyNames(HomeServerApi.prototype)) {
|
||||
}
|
||||
}
|
||||
|
||||
export class SendScheduler {
|
||||
export class RequestScheduler {
|
||||
constructor({hsApi, clock}) {
|
||||
this._hsApi = hsApi;
|
||||
this._clock = clock;
|
Loading…
Reference in New Issue
Block a user