waitForServices(
		serviceNames,
		timeout = this.options.dependencyTimeout,
		interval = this.options.dependencyInterval,
		logger = this.logger
	) {
		if (!Array.isArray(serviceNames)) serviceNames = [serviceNames];

		serviceNames = utils.uniq(
			_.compact(
				serviceNames.map(x => {
					if (utils.isPlainObject(x) && x.name) {
						if (Array.isArray(x.version)) {
							return x.version.map(v =>
								this.ServiceFactory.getVersionedFullName(x.name, v)
							);
						} else {
							return this.ServiceFactory.getVersionedFullName(x.name, x.version);
						}
					} else if (utils.isString(x)) {
						return x;
					}
				})
			)
		);

		if (serviceNames.length == 0) return this.Promise.resolve({ services: [], statuses: [] });

		logger.info(
			`Waiting for service(s) '${serviceNames
				.map(n => (Array.isArray(n) ? n.join(" OR ") : n))
				.join(", ")}'...`
		);

		const startTime = Date.now();
		return new this.Promise((resolve, reject) => {
			const check = () => {
				const serviceStatuses = serviceNames.map(name => {
					if (Array.isArray(name)) {
						return name.map(n => ({
							name: n,
							available: this.registry.hasService(n)
						}));
					} else {
						return {
							name,
							available: this.registry.hasService(name)
						};
					}
				});
				const flattenedStatuses = _.flatMap(serviceStatuses, s => s);
				const names = flattenedStatuses.map(s => s.name);
				const availableServices = flattenedStatuses.filter(s => s.available);

				const isReady = serviceStatuses.every(status =>
					Array.isArray(status) ? status.some(n => n.available) : status.available
				);
				if (isReady) {
					logger.info(
						`Service(s) '${availableServices
							.map(s => s.name)
							.join(", ")}' are available.`
					);
					return resolve({ services: names, statuses: flattenedStatuses });
				}

				const unavailableServices = flattenedStatuses.filter(s => !s.available);
				logger.debug(
					format(
						"%d (%s) of %d services are available. %d (%s) are still unavailable. Waiting further...",
						availableServices.length,
						availableServices.map(s => s.name).join(", "),
						serviceStatuses.length,
						unavailableServices.length,
						unavailableServices.map(s => s.name).join(", ")
					)
				);

				if (timeout && Date.now() - startTime > timeout)
					return reject(
						new E.MoleculerServerError(
							"Services waiting is timed out.",
							500,
							"WAITFOR_SERVICES",
							{ services: names, statuses: flattenedStatuses }
						)
					);

				setTimeout(check, interval);
			};

			check();
		});
	}
Wait for other services

@param {String|Array<String>} serviceNames
@param {Number} timeout Timeout in milliseconds
@param {Number} interval Check interval in milliseconds
@returns {Promise}

@memberof ServiceBroker