Last active
January 4, 2018 13:57
-
-
Save jackpinto/77df4d39fb42a29c357cbfb2138e1680 to your computer and use it in GitHub Desktop.
HangFire log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TOP (1000) q.[Id], q.[JobId], q.[Name], q.[Reason], q.[CreatedAt], q.[Data] | |
FROM [SimplesNacional.Task].[HangFire].[State] q | |
INNER JOIN | |
( | |
SELECT | |
MAX(x.id) stateid, | |
x.jobid | |
FROM [SimplesNacional.Task].[HangFire].[State] x | |
WHERE x.name = 'Failed' | |
AND x.jobid IN | |
( | |
SELECT | |
j.id | |
FROM [SimplesNacional.Task].[HangFire].[Job] j | |
WHERE j.statename = 'Failed' | |
) | |
GROUP BY x.jobid | |
) xxx | |
ON q.id = xxx.stateid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment