forked from cory/tildefriends
Cleanup of some minor old cruft in the js code.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4757 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
74eb74deb1
commit
f4979c841a
11
core/core.js
11
core/core.js
@ -3,7 +3,6 @@ import * as auth from './auth.js';
|
||||
import * as form from './form.js';
|
||||
import * as http from './http.js';
|
||||
|
||||
let gProcessIndex = 0;
|
||||
let gProcesses = {};
|
||||
let gStatsTimer = false;
|
||||
|
||||
@ -125,8 +124,7 @@ function invoke(handlers, argv) {
|
||||
|
||||
function broadcastEvent(eventName, argv) {
|
||||
let promises = [];
|
||||
for (let i in gProcesses) {
|
||||
let process = gProcesses[i];
|
||||
for (let process of Object.values(gProcesses)) {
|
||||
if (process.eventHandlers[eventName]) {
|
||||
promises.push(invoke(process.eventHandlers[eventName], argv));
|
||||
}
|
||||
@ -137,8 +135,7 @@ function broadcastEvent(eventName, argv) {
|
||||
function broadcast(message) {
|
||||
let sender = this;
|
||||
let promises = [];
|
||||
for (let i in gProcesses) {
|
||||
let process = gProcesses[i];
|
||||
for (let process of Object.values(gProcesses)) {
|
||||
if (process != sender
|
||||
&& process.packageOwner == sender.packageOwner
|
||||
&& process.packageName == sender.packageName) {
|
||||
@ -151,9 +148,7 @@ function broadcast(message) {
|
||||
|
||||
function getUser(caller, process) {
|
||||
return {
|
||||
name: process.userName,
|
||||
key: process.key,
|
||||
index: process.index,
|
||||
packageOwner: process.packageOwner,
|
||||
packageName: process.packageName,
|
||||
credentials: process.credentials,
|
||||
@ -208,8 +203,6 @@ async function getProcessBlob(blobId, key, options) {
|
||||
print("Creating task for " + blobId + " " + key);
|
||||
process = {};
|
||||
process.key = key;
|
||||
process.index = gProcessIndex++;
|
||||
process.userName = 'user' + process.index;
|
||||
process.credentials = options.credentials || {};
|
||||
process.task = new Task();
|
||||
process.eventHandlers = {};
|
||||
|
Loading…
Reference in New Issue
Block a user