Skip to content

Commit

Permalink
Use better way to specify fork
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Nov 8, 2024
1 parent 3948a80 commit 08e7fa3
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone
modules = KORDEX_MODULES.associateWith {
KORDEX_VERSION ?: "Unknown"
},
fork = FORK_NAME
)

is DataCollection.Standard ->
Expand Down Expand Up @@ -169,6 +170,7 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone

jvmVersion = System.getProperty("java.version"),
kotlinVersion = KotlinVersion.CURRENT.toString(),
fork = FORK_NAME
)

is DataCollection.Extra -> {
Expand Down Expand Up @@ -237,7 +239,8 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone
plugins = settings.pluginBuilder.managerObj.plugins.map { it.descriptor.pluginId }
.toTypedArray(),
ramAvailable = hardware.memory.total,
threadCount = processor.logicalProcessorCount
threadCount = processor.logicalProcessorCount,
fork = FORK_NAME
)

if (applicationInfo.team != null) {
Expand Down Expand Up @@ -271,14 +274,6 @@ public class DataCollector(public val level: DataCollection) : KordExKoinCompone

logger.debug { "Submitting collected data - level: ${level.readable}, last UUID: $lastUUID" }

// This is only required for the mikbot fork
entity = when (entity) {
is MinimalDataEntity -> entity.copy(fork = FORK_NAME)
is StandardDataEntity -> entity.copy(fork = FORK_NAME)
is ExtraDataEntity -> entity.copy(fork = FORK_NAME)
else -> entity
}

val response = DataAPIClient.submit(entity)

setUUID(response)
Expand Down

0 comments on commit 08e7fa3

Please sign in to comment.