Skip to content
Snippets Groups Projects
Commit fea9524d authored by maik.schaefer's avatar maik.schaefer Committed by julian.baeume
Browse files

Execute update immediately on 'unknown' version

parent 002720f1
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ export async function getVersionInfo () {
/**
* Fetches latest version from all the ui-containers
* @returns {Promise<number>} Return a promise containing this information
* @returns {Promise<string>} Return a promise containing this information
*/
export async function fetchLatestVersion () {
const versionInfo = await fetchVersionInfo()
......@@ -101,7 +101,7 @@ export async function fetchLatestVersion () {
/**
* Gets latest version from redis or the ui-containers, if not cached.
* @returns {Promise<number>} Return a promise containing this information
* @returns {Promise<string>} Return a promise containing this information
*/
export async function getLatestVersion () {
const versionInfo = await getVersionInfo()
......@@ -180,7 +180,7 @@ export async function updateVersionProcessor (pubClient) {
}
logger.info(`[Version] Found new source version. Current version: '${storedVersion}', new version: '${fetchedVersionInfo.version}'`)
// that means, that between the previous update processing and this one, there was no version change
if (!storedVersion || prevProcessedVersion === fetchedVersionInfo.version) {
if (!storedVersion || storedVersion === 'unknown' || prevProcessedVersion === fetchedVersionInfo.version) {
// update local version info
Object.assign(versionInfo, fetchedVersionInfo)
const stringifiedVersionInfo = JSON.stringify(versionInfo)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment