Page 28 of 40
Re: Webinterface
Posted: Wed Jun 22, 2022 12:48 pm
by emcodem
Hey @dkoos
i have seen such a case before when mediainfo "successfully" delivers "empty" output but i don't recall at the moment what case that was.
Might this only be about the mov file type is not supported by this mediainfo version or such? Actually the output is not blank but it misses any data as we see mediainfo returns <html><head> and such but no content in the <body> section.
As usuall my suggestion would be to simplify and try to reproduce as first step. Simplify by just executing mediainfo on command line manually, e.g.
Code: Select all
"c:\webint...\...\mediainfo.exe" --output=HTML "\\server\share\file.mov"
Normally mediainfo should come back at least with the filename and size, so you can e.g. also try 0kb or any text file and confirm if mediainfo output is always an empty html that only contains exactly what you see in your screenshot under "Response body".
I'd do this when running server.exe in commandline instead of as service first. This way you can easily confirm using vlc plaer or whatever that the file you analyze is definitely readable.
Another option is of course to just exchange mediainfo.exe by the one that comes with ffastrans, i believe ffastrans usually delivers the most recent working version. If you download mediainfo from internet, make sure you use the commandline .exe not the gui .exe
I think it is most interesting what mediainfo spits out for a 0kb file...
Re: Webinterface
Posted: Thu Oct 13, 2022 12:42 am
by Ben
The condition script for a scheduled job adds 'Scheduled Job' as the Source description when viewed in the status monitor. This is great.
However, is it possible to go further and use variables so the Source text is different each time? e.g. I want to trigger a job each day, and instead of reading through the logs and seeing lots of 'Scheduled Job' text, I want it to show the day of the week it ran. I tried %s_week_day% and date.getDate(); but neither worked.
I unfortunately don't know node.js.
Re: Webinterface
Posted: Thu Oct 13, 2022 1:23 am
by Ben
Also, putting the name of the custom node text (command executor) in place of 'Scheduled Job' would be cool. So if I label my command executor with a name 'Yellow mic' have that show up as the Source text.
Re: Webinterface
Posted: Thu Oct 13, 2022 7:31 am
by emcodem
Hey @Ben,
i am absolutely a fan of everyone who uses the scheduled jobs so you get whatever you ask from me
For setting the date as Source so you see it in the job monitor you can do like
Code: Select all
var datestring = new Date().toISOString()
process.send([datestring]);
Currently there is no way to retrieve the details of the ffastrans workflow that is connected to the scheduled job. I thought about that initially but could not decide which way to go for it. Now that you ask for it, i finally decided:
I'll send an updated version soon that posts all the job details to the script. There are only 2 ways to do that, either passing a json file path to the script (and thus the script needs to "read" the json before accessing job details), or by passing the job object as message.
I decided for a message, so in the updated next release you can set the startproc name as "Source" info like that.
Code: Select all
var datestring = new Date().toISOString()
process.on('message', (parameters) => { //backend will send job details as "message" at script startup
var wf = JSON.parse(parameters.self.workflow);
var startproc = wf.start_proc_name;
process.send([startproc + " " +datestring]);//start one job named %startproc% %date%
});
Re: Webinterface
Posted: Thu Oct 13, 2022 10:53 am
by Ben
Hey @emcodem
I used the first code you sent and ended up with many numbers. I did some googling and changed it to .toDateString and ended up with a much nicer visual result. Thanks for that!
Is it possible to still include a bit of my own text in addition to the datestring? I tried
process.send("My comments here", [datestring]);
but it didn't work, cos I dunno what I'm doing haha.
That sounds really good. I'm looking forward to the new release. I'm using the scheduler to fire off ffmpeg commands to record audio inputs at set times for set durations with very specific file names. Using variables and frequency I can control most of what I need all from the web interface.
But having the scheduled job know details of the workflow would take it to an even greater level.
Btw, if you're interested I have a few ideas on how the great scheduler could be made even greater and easier to use:
The test run button I find very handy. Perhaps having it in the main toolbar near the save button would be good.
Bulk selecting multiple schedules to perform actions such as enable/disable, test run, export and delete.
Folders to organise the schedules.
When adding in frequencies it defaults to 5 min. If I'm adding in a few entries each as 'every week', it'd be nice if the new schedule frequency I add remembers my last selection.
When job/s are Running allow the user to click on the Running box and it takes you to the job status page (hyperlink Running).
Make the log-in page mobile responsive (in case I need to check running jobs quickly on the go).
Re: Webinterface
Posted: Thu Oct 13, 2022 11:09 am
by emcodem
Ben wrote: ↑Thu Oct 13, 2022 10:53 am
process.send("My comments here", [datestring]);
but it didn't work, cos I dunno what I'm doing haha.
ok so the idea is that you send an array and there will be one job started for each item in the array, so e.g. if you do
process.send(["first","second"]); you will end up having 2 jobs in ffastrans. For example, you could now go through a list of files, pick the ones you are interested and send the array of filenames using process.send. You would end up with one ffastrans job for each file.
If you want to just start one ffastrans job, you still have to send an array but only one item, e.g. process.send(["first"]);
So all you need to do to get to your goal is to first construct a string:
Code: Select all
var jobname = new Date().toISOString();
jobname += "_myawesomeaddition"
process.send([jobname]);
For debugging you do something like:
Code: Select all
var jobname = new Date().toISOString();
jobname += "_myawesomeaddition"
console.log(jobname)
and test run the script, you should see the calculated jobname in the log output.
Ben wrote: ↑Thu Oct 13, 2022 10:53 am
That sounds really good. I'm looking forward to the new release. I'm using the scheduler to fire off ffmpeg commands to record audio inputs at set times for set durations with very specific file names. Using variables and frequency I can control most of what I need all from the web interface.
But having the scheduled job know details of the workflow would take it to an even greater level.
Yeah i use it for starting ffmpeg recording from blackmagic
Have you got the latest pre-release version? There were some major updates to the scheduling stuff:
https://github.com/emcodem/ffastrans_we ... ag/1.3.0.1
Ben wrote: ↑Thu Oct 13, 2022 10:53 am
Perhaps having it in the main toolbar near the save button would be good.
Bulk selecting multiple schedules to perform actions such as enable/disable, test run, export and delete.
Folders to organise the schedules.
When adding in frequencies it defaults to 5 min. If I'm adding in a few entries each as 'every week', it'd be nice if the new schedule frequency I add remembers my last selection.
When job/s are Running allow the user to click on the Running box and it takes you to the job status page (hyperlink Running).
Make the log-in page mobile responsive (in case I need to check running jobs quickly on the go).
Uhh tahts a lot of ideas, most of them i already thought about but didnt do anything yet because i feel it would be more important to make it even more easy to use e.g. provide predefined condition scripts for example folder comparison and such. Anyway i'll see what i can do
Also we'd need a history of scheduled executions, e.g. there is no log about what it did and why...
Re: Webinterface
Posted: Thu Oct 13, 2022 11:22 am
by Ben
Excellent, it's working great. Super nice to be able to quickly read through the logs and know when and what happened.
Yes I'm running 1.3.0.1
Yeah i use it for starting ffmpeg recording from blackmagic
Oh nice. I pretty much got the Stream Deck to have a button that goes red or black depending on if a certain job is running or not using the API. So cool all the things you can do with FFAStrans.
Yeah I figured you would have thought of most of those ideas. Predefined condition scripts definitely sounds good to me.
Re: Webinterface
Posted: Thu Oct 13, 2022 1:55 pm
by emcodem
@Ben
i really need some help for testing the scheduled jobs. I'd like to test over very long time and see if each and every execution was executed as expected.
Any ideas?
Or what was your experience, did it all work as expected or was it kind of bulky to get the scheduled job actually doing it's work?
Re: Webinterface
Posted: Fri Oct 14, 2022 12:17 am
by Ben
@emcodem
Perhaps using Grafana you could run some stress tests and simulations?
I'll be running about 8 scheduled jobs on a regular basis, I can let you know if I encounter any issues. I'll be adding a handful more schedules soon. So far zero issues.
Setting it all up was relatively simple. I like how easy and flexible the frequency is, and that you can add multiple frequencies. The only thing I have to double-check is that I've enabled the schedule and clicked save.
Re: Webinterface
Posted: Thu Oct 27, 2022 10:18 am
by Ben
Hello @emcodem. I'm getting the following error when I'm using the web interface and select a running job and click Abort:
error aborting job, contact developer. status: error
I used to be able to abort jobs at one point. Not sure what I've changed since then. I can abort the jobs manually via the status monitor on the computer itself.