fix: address job.id properly in persistence

This commit is contained in:
Harris 2021-04-14 12:26:34 +10:00
parent 5bcac3b39c
commit d3ca54ce86

View File

@ -54,7 +54,7 @@ class JobQueue : JobDelegate {
// of the order in which the jobs were added.
val currentTime = System.currentTimeMillis()
jobTimestampMap.putIfAbsent(currentTime, AtomicInteger())
job.id = jobTimestampMap[currentTime]!!.getAndIncrement().toString()
job.id = currentTime.toString() + jobTimestampMap[currentTime]!!.getAndIncrement().toString()
MessagingConfiguration.shared.storage.persistJob(job)
}