~williewillus/r16

eeab44dd617c6ecded0b07625b97423761c54656 — Vincent Lee a month ago 3dc6304
Move save loop to main.rkt
2 files changed, 8 insertions(+), 8 deletions(-)

M frontends/discord.rkt
M main.rkt
M frontends/discord.rkt => frontends/discord.rkt +0 -8
@@ 227,14 227,6 @@
                    (vector-ref v 0)
                    (vector-ref v 1)))
          (loop))))
      (~>
       (let loop ()
        (sleep 30)
        (define result (send (current-backend) save))
        (when (exn:fail? result)
          (log-r16-error (~a "Error saving tricks: " result)))
        (loop))
       thunk thread)
      (rc:on-event 'raw-message-create client message-received)
      (rc:on-event 'raw-guild-create client guild-create)
      (rc:start-client client))

M main.rkt => main.rkt +8 -0
@@ 98,6 98,14 @@

  (parameterize ([current-backend (new r16% [db db])]
                 [current-frontend (make-frontend config)])
    (thread
     (thunk
      (let loop ()
        (sleep 30)
        (define result (send (current-backend) save))
        (when (exn:fail? result)
          (log-r16-error (~a "Error saving tricks: " result)))
        (loop))))
    (send (current-frontend) start)))

(module* main #f