Skip to content

Commit

Permalink
Fix serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
tomijange committed Jan 9, 2024
1 parent 31e5e1a commit c990966
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ plugins {
group = "io.hawk"

allprojects {
version = "1.0.3"
version = "1.0.4"
}
10 changes: 6 additions & 4 deletions hawk-dlp-common/src/main/kotlin/io/hawk/dlp/common/Job.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ data class Job(
/**
* Time when this job was created.
*/
val created: LocalDateTime = LocalDateTime.now(),
val created: LocalDateTime = LocalDateTime.now()
) {
private val logger = LoggerFactory.getLogger(javaClass)

/**
* The request that was used to create this job.
* Encapsulates the input data.
*/
@field:JsonIgnore val request: JobRequest? = null,
) {
private val logger = LoggerFactory.getLogger(javaClass)
@field:JsonIgnore
var request: JobRequest? = null

/**
* The status of this job.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class JobService(
private val jobs: MutableMap<UUID, Job> = ConcurrentHashMap()

fun createJob(request: JobRequest): Job {
val job = Job(request = request)
val job = Job()
job.request = request
logger.info("Job[{}] created: {} {}", job.id, request.content.javaClass, request.goals)
jobs[job.id] = job

Expand Down

0 comments on commit c990966

Please sign in to comment.