Skip to content

Commit

Permalink
fix 'shouldReload' function
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkky committed Mar 7, 2019
1 parent 1632dd1 commit bf30119
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/src-lib/Hasura/Server/SchemaUpdate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,9 @@ schemaUpdateEventProcessor strfyNum pool logger httpManager
-- init schema cache built then reload
shouldReload (SUESuccess payload) =
(_epInstanceId payload /= getInstanceId instanceId)
&& withCacheInit (_epOccurredAt payload) cacheInit
&& maybe True (withCacheInit $ _epOccurredAt payload) cacheInit

withCacheInit _ Nothing = False
withCacheInit occurredAt (Just initTime) = occurredAt > initTime
withCacheInit occurredAt initTime = occurredAt > initTime

logInfo :: Logger -> ThreadType -> Value -> IO ()
logInfo logger threadType val = unLogger logger $
Expand Down

0 comments on commit bf30119

Please sign in to comment.