Skip to content

Commit

Permalink
feat: migrate to UNIX cron
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenSrcerer committed Apr 7, 2024
1 parent 93a6701 commit e7bdc05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package online.danielstefani.paddy.daemon

import io.quarkus.logging.Log
import jakarta.enterprise.context.ApplicationScoped
import org.neo4j.ogm.session.SessionFactory
import org.neo4j.ogm.session.queryForObject
Expand All @@ -27,7 +26,6 @@ class DaemonRepository(
): Daemon? {
return with(factory.openSession()) {
get(id)?.also {

val query = """
MATCH (node:Daemon { id: "$id" })
SET node.on = ${on ?: !it.on}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ open class Schedule {
private const val LATENCY_SECONDS = 1

private val cronParser = CronParser(
CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ))
CronDefinitionBuilder.instanceDefinitionFor(CronType.UNIX))
}

@Id
Expand All @@ -44,7 +44,7 @@ open class Schedule {
// Signifies that this Schedule will run periodically.
var periodic: String? = null

// The last time this Schedule was executed
// The next time this Schedule will be executed
var nextExecution: Long? = null

// Signifies that this Schedule will finish running at some point.
Expand Down

0 comments on commit e7bdc05

Please sign in to comment.