Jump to content

Emby Server small visual bug: If you start and then cancel a scheduled task


Recommended Posts

Posted

Found a small visual bug that I did not see a bug report for:

If you start and then cancel a scheduled task, the status will initially say "Last ran in 2 seconds, taking 1 seconds." which will then increment to "Last ran 1 second ago, taking 0 seconds". I suspect this should say "Last ran 0 seconds ago, taking 1 seconds" instead of "Last ran in 2 seconds". Interestingly, the string "in 2 seconds" seems consistent regardless of how long I let it run before cancelling.

Untitled.png.238f2485444316446fc753dec12ac62f.png

Posted (edited)

Hi,

The first number will keep increasing because that's how long ago the task was ran.  The second number is how long the process took to run and shouldn't change.

Edited by cayars
Posted
10 hours ago, cayars said:

Hi,

The first number will keep increasing because that's how long ago the task was ran.  The second number is how long the process took to run and shouldn't change.

Sure, but shouldn't it say "Last ran X seconds ago for Y seconds"? What I'm seeing is it first says "Last ran in 2 seconds ago" and then it switches to "last ran 1 seconds ago" and then counts up from there.

Posted

I'm wouldn't think so no, because it's normally going to look more like this:

image.png.c55be0a57a1cf6514719ef6a938b4791.png

Posted

No he's right, last ran in 2 seconds doesn't make sense. i'm just having a hard time getting that to happen.

GrimReaper
Posted

If your server time is not same as device time from where you're accessing it, it is easily recreated. 

 

IMG_20201201_215605.jpg

Posted

I had it on my Synology just now viewing through the web UI.

Refreshing the page got it looking normal again.

embytime.png

Posted

Ok the problem is we're using a native function to get that relative time string, which is great because the system (or browser), gives it to us already translated. I'd rather not have to give this up and build this text ourselves, so we're just going to have to hack it.

If your device time is wrong and ahead of the server, then we'll just have to hack it and hard-code it to something like 1 second offset.

Posted
1 hour ago, Luke said:

No he's right, last ran in 2 seconds doesn't make sense. i'm just having a hard time getting that to happen.

Isn't the two seconds just the amount of time since you ran/ended the job.  If you wait 5 seconds and refresh the page it should then say 7 seconds in that same spot.

The timezone thing is a different issue altogether isn't it?

GrimReaper
Posted (edited)
1 minute ago, cayars said:

Isn't the two seconds just the amount of time since you ran/ended the job.  If you wait 5 seconds and refresh the page it should then say 7 seconds in that same spot. 

No, actually, it would say "3 seconds ago". 🤔

Edited by GrimReaper76
Posted
1 minute ago, cayars said:

Isn't the two seconds just the amount of time since you ran/ended the job.  If you wait 5 seconds and refresh the page it should then say 7 seconds in that same spot.

The timezone thing is a different issue altogether isn't it?

Yes it should say that. Being in a different timezone from the server is ok. The issue is mainly about being in the same timezone and having devices whose clock times are slightly off from the server.

  • Like 1
Posted

I guess I'm not sure what the device has to do with duration or how long ago a process ran.  Those aren't timezone dependent.  5 min ago is still 5 minutes ago regardless of when it ran.

Is the Server not generating the strings sent to the clients?

GrimReaper
Posted

Which then gets translated to client machine time and that value presented? This is net result of client time being 10 minutes BEHIND server time:

 

IMG_20201201_231006.jpg

GrimReaper
Posted
12 minutes ago, Luke said:

That's right, yes.

Maybe it would be better to present absolute time server-wise then, regardless of actual time on any machine? Just how much time elapsed on SERVER since last occurence? 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...