SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV v7 Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #301  
Old 01-14-2011, 01:01 PM
BobPhoenix BobPhoenix is offline
SageTVaholic
 
Join Date: Oct 2004
Posts: 3,152
Quote:
Originally Posted by gabrielcab View Post
What for is primarily used? to schedule TV recording? what else can a home user could use it for an HTPC experimental?
I will be using it to move my recordings to my unRAID server once I get everything setup the way I want.
Reply With Quote
  #302  
Old 01-14-2011, 03:43 PM
ewelin ewelin is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Cambridge, MA
Posts: 165
Send a message via AIM to ewelin Send a message via MSN to ewelin Send a message via Yahoo to ewelin
Slugger thanks for the replies. I'll give it a wirl as outlined above, but that's later this weekend. Right now I'm trying to get a 2nd client going. Both the server and client (slave) are in the basement right next to each other. I downloaded and installed the windows service. I then copied over the properties file and put the following at the end:
Code:
agent.port=23344
agent.schedule=* * * * *
agent.resources=100
task.HDCOMSKIP.exe=C:/Tools/comskip/comskip.exe
task.HDCOMSKIP.args="--ini=C:\Tools\comskip\comskip.ini" "$SJQ4_PATH\$SJQ4_LAST_SEGMENT"
task.HDCOMSKIP.test=\\63-server\SageTV\SJQscripts\comskip_test.groovy
task.HDCOMSKIP.testargs=ts
task.HDCOMSKIP.schedule=* * * * *
task.HDCOMSKIP.resources=51
task.HDCOMSKIP.maxprocs=1
task.HDCOMSKIP.maxtime=28800
task.HDCOMSKIP.rcmin=1
task.HDCOMSKIP.rcmax=1
I then installed the service, and started it. From there I registered the client on the server via hostname and it said it was offline and I couldn't get it to show up as online. I also tried using IP instead of hostname and the same result. I'm at a loss, any idea why the slave isn't showing up as online?
Reply With Quote
  #303  
Old 01-14-2011, 03:56 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Firewall blocking access? Either a firewall on the client or the server? Could be either side. Have a look at sjq.log in plugins/sjq on the server. It'll log the exception everytime it tries to contact the new client. What's the exception? If it's "connection timed out" it's probably a firewall thing. If it's "connection refused" then the client didn't start properly so head over to the client host and look at the logs there. If it's something else then I'll need to see the exception stacks. Also, realize it might take up to 10 mins (using default SJQ server settings) for a newly registered client to show up as online (maybe, thought I fixed that before public beta 1).
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #304  
Old 01-14-2011, 04:36 PM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
Quote:
Originally Posted by Slugger View Post
I'm not sure what you mean by this? If SJQ kills your process (or says it did) it shouldn't be running again. Unless you mean you run the script again and it finds the same media file to process again because it never properly completed the first time? I could understand that, but that is avoidable by tagging the media file with metadata to say you've already processed it so as not to repeat processing of the same media file.
I'm only adding the task (manually) once. The task is marked as "Running" (green), the groovy script is executed, mediashrink starts to run under the java process, then at some point it relaunches itself and is no longer a sub-process, mediashrink completes and I have my MKV, the task turns orange (but is stlil marked "Running"), my SJQ test script log on the task is empty and it says SJQ killed the process. There is a pause for a few seconds , the task goes back to green, script is called and mediashrink is relaunched. The created time on the task stays the same so I guess it never left the queue.

After further testing, it appears my script is being returned to after MediaShrink completes (yeah!), because I tested writing a tag to the original MPG media file (and it's in the .properties file) after the .waitFor() for MediaShrink. Even though I do have a "return 0" at the end of the script, for some reason the log is never displayed and the task thinks things are still in flux. :/

I'll get you a copy of the script when I can. Currently it's a mess and hard to read.
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial
Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT
Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders
Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders
Backup: Synology
SageTV version: FINAL
Reply With Quote
  #305  
Old 01-14-2011, 05:51 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by phelme View Post
I'm only adding the task (manually) once. The task is marked as "Running" (green), the groovy script is executed, mediashrink starts to run under the java process, then at some point it relaunches itself and is no longer a sub-process, mediashrink completes and I have my MKV, the task turns orange (but is stlil marked "Running"), my SJQ test script log on the task is empty and it says SJQ killed the process. There is a pause for a few seconds , the task goes back to green, script is called and mediashrink is relaunched. The created time on the task stays the same so I guess it never left the queue.

After further testing, it appears my script is being returned to after MediaShrink completes (yeah!), because I tested writing a tag to the original MPG media file (and it's in the .properties file) after the .waitFor() for MediaShrink. Even though I do have a "return 0" at the end of the script, for some reason the log is never displayed and the task thinks things are still in flux. :/

I'll get you a copy of the script when I can. Currently it's a mess and hard to read.
I'm guessing that mediashrink fork()s itself off and does its thing in a separate process, which coincides with what you're telling me about the process tree you're seeing. When the parent returns control back to groovy I'm also guessing it returns an error that the groovy process handler isn't liking and the script is inadvertently returning 1 and if it returns 1 (or any value that isn't 0 or 2, i.e. 255, which might be happening depending on what mediashrink is doing for the fork()) then SJQ will assume the script failed and put the task back in the queue, which is why it seems to auto restart itself. To fix this:

1) Convince evilpenguin to experiment with mediashrink + SJQv4; he has way more knowledge about the interactions between the two system than I do. My test system is Linux, I don't run MS on my production system and I don't believe it runs on Linux so I really have no way to investigate it.

OR...

2) Don't run your groovy script as a test script, but instead run it as the exe. Doing that means only 0 and non-zero return values are processed and the task will never be pushed back into the queue (only pretest scripts have the ability to push the task back to the queue, which sounds like what's happening here)

I actually recommend you do #2 regardless... you don't need to define a test for a task, only an exe. So don't define a test and move your current groovy script to the exe (prefix it with script: when doing that so SJQ knows it's a groovy script you're wanting to execute for the task exe).
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #306  
Old 01-15-2011, 10:32 AM
ewelin ewelin is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Cambridge, MA
Posts: 165
Send a message via AIM to ewelin Send a message via MSN to ewelin Send a message via Yahoo to ewelin
Quote:
Originally Posted by Slugger View Post
Firewall blocking access? Either a firewall on the client or the server? Could be either side. Have a look at sjq.log in plugins/sjq on the server. It'll log the exception everytime it tries to contact the new client. What's the exception? If it's "connection timed out" it's probably a firewall thing. If it's "connection refused" then the client didn't start properly so head over to the client host and look at the logs there. If it's something else then I'll need to see the exception stacks. Also, realize it might take up to 10 mins (using default SJQ server settings) for a newly registered client to show up as online (maybe, thought I fixed that before public beta 1).
Firewall it was. Thanks again. Now I've got my 2nd agent setup and running with the same task, hdcomskip. What's strange is that if I view the queue, it shows one item running on the server, and the rest of the tasks are marked as returned. What does returned mean?
Reply With Quote
  #307  
Old 01-15-2011, 11:13 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Returned means the test script failed and returned 1... have a look at the output for clues as to the reason.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #308  
Old 01-15-2011, 11:26 AM
ewelin ewelin is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Cambridge, MA
Posts: 165
Send a message via AIM to ewelin Send a message via MSN to ewelin Send a message via Yahoo to ewelin
Where would that be located? If I view the logs via the GUI it says "No log information for this task"
Reply With Quote
  #309  
Old 01-15-2011, 01:21 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Updated UI Mod Plugin

I just uploaded a new UI Mod Plugin which *should* fix the issues reported. I can't reproduce the "Tasks disappearing" issue but I think I know why it was happening. I'd appreciate feedback, positive or negative, on the issue.

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #310  
Old 01-15-2011, 02:30 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by ewelin View Post
Where would that be located? If I view the logs via the GUI it says "No log information for this task"
If that's happening then there's a problem with the script itself... look in the log file of the task client that ran it.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #311  
Old 01-15-2011, 04:24 PM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
Quote:
Originally Posted by Slugger View Post
2) Don't run your groovy script as a test script, but instead run it as the exe. Doing that means only 0 and non-zero return values are processed and the task will never be pushed back into the queue (only pretest scripts have the ability to push the task back to the queue, which sounds like what's happening here)

I actually recommend you do #2 regardless... you don't need to define a test for a task, only an exe. So don't define a test and move your current groovy script to the exe (prefix it with script: when doing that so SJQ knows it's a groovy script you're wanting to execute for the task exe).
This did the trick! Everything executes now as expected. Additionally, now that I have Eclipse setup I can make faster progress.

Thanks Slugger!!
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial
Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT
Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders
Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders
Backup: Synology
SageTV version: FINAL
Reply With Quote
  #312  
Old 01-15-2011, 05:28 PM
ewelin ewelin is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Cambridge, MA
Posts: 165
Send a message via AIM to ewelin Send a message via MSN to ewelin Send a message via Yahoo to ewelin
Quote:
Originally Posted by Slugger View Post
If that's happening then there's a problem with the script itself... look in the log file of the task client that ran it.
The groovy script? It's the exact same script. I configured both agents to have the exact same HDCOMSKIP task. The groovy script is in a network location which both agents can access. The comskip is installed in the same location on both machines.

I'm also not sure which log file you want me ot look at. Is it the sjqagent.log file on the agent computer in the logs folder? If so that file isn't much help:
Code:
2011-01-14 15:47:17,285 INFO  [Config]: Watching 'C:\sjqagent\bin\..\conf'
2011-01-14 15:58:14,390 INFO  [Config]: Watching 'C:\sjqagent\bin\..\conf'
2011-01-14 16:13:54,213 INFO  [Config]: Watching 'C:\sjqagent\bin\..\conf'
2011-01-14 16:21:14,209 INFO  [Config]: Watching 'C:\sjqagent\bin\..\conf'
2011-01-15 18:20:09,905 INFO  [Config]: Watching 'C:\sjqagent\bin\..\conf'
Reply With Quote
  #313  
Old 01-15-2011, 05:42 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
That's the log... I might turn to the sjq.log on the server. If there's no help there then you might have to crank the log level up - start on the task client. Edit the sjqagent.log4j.properties file. Increase logging from INFO to DEBUG, restart agent. (The log will get real big, real fast.)

EDIT: Once you crank up the logging, reproduce the scenario (tasks keep going back to returned). Send me the debug level task client log along with the server's sjq.log (at INFO level). I need to compare side by side to see how the two are interacting.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...

Last edited by Slugger; 01-15-2011 at 05:45 PM.
Reply With Quote
  #314  
Old 01-15-2011, 06:59 PM
ewelin ewelin is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Cambridge, MA
Posts: 165
Send a message via AIM to ewelin Send a message via MSN to ewelin Send a message via Yahoo to ewelin
Something is funky... log did not get big at all..
client:
Code:
2011-01-15 19:55:46,839 INFO  [Config]: Watching 'C:\sjqagent\bin\..\conf'
sjq.log:
Code:
2011-01-15 19:54:41,963 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:54:51,404 INFO  [ListenerClient]: Disconnected from 63-server:23344
2011-01-15 19:54:51,404 INFO  [ActiveTaskManager]: Validated 1 running task(s)!
2011-01-15 19:55:03,972 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-01-15 19:55:11,975 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:55:33,984 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-01-15 19:55:41,987 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:55:51,412 INFO  [ListenerClient]: Disconnected from 63-server:23344
2011-01-15 19:55:51,412 INFO  [ActiveTaskManager]: Validated 1 running task(s)!
2011-01-15 19:56:03,996 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-01-15 19:56:05,809 INFO  [AgentManager]: Pinging Client[host=63-server:23344,state=ONLINE,lastUpdate=2011-01-15 19:54:05.808]
2011-01-15 19:56:05,809 INFO  [ListenerClient]: Disconnected from 63-server:23344
2011-01-15 19:56:05,809 INFO  [AgentManager]: Pinging Client[host=63-slave:23344,state=OFFLINE,lastUpdate=2011-01-15 19:54:26.785]
2011-01-15 19:56:06,434 INFO  [ListenerClient]: Disconnected from 63-slave:23344
2011-01-15 19:56:11,999 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:56:14,969 INFO  [Listener]: Received connection from: /192.168.15.10
2011-01-15 19:56:17,876 INFO  [Handler]: CMD: ADDTASK :: PEER: /192.168.15.10
2011-01-15 19:56:18,189 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-01-15 19:56:18,595 INFO  [Handler]: CMD: QUIT :: PEER: /192.168.15.10
2011-01-15 19:56:26,192 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:56:26,208 WARN  [TaskQueue]: Client does not have enough free resources to perform this task! [49 < 51]; skipping: Client[host=63-server:23344,state=ONLINE,lastUpdate=Sat Jan 15 19:56:26 EST 2011]
2011-01-15 19:56:26,208 INFO  [ListenerClient]: Disconnected from 63-server:23344
2011-01-15 19:56:27,442 INFO  [TaskQueue]: Assigned task 237 of type 'HDCOMSKIP' to Client[host=63-slave:23344,state=ONLINE,lastUpdate=Sat Jan 15 19:56:24 EST 2011]
2011-01-15 19:56:27,646 INFO  [ListenerClient]: Disconnected from 63-slave:23344
2011-01-15 19:56:32,913 INFO  [Listener]: Received connection from: /192.168.15.11
2011-01-15 19:56:33,070 INFO  [Handler]: CMD: UPDATE :: PEER: /192.168.15.11
2011-01-15 19:56:33,304 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-01-15 19:56:33,679 INFO  [Handler]: CMD: QUIT :: PEER: /192.168.15.11
2011-01-15 19:56:34,008 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-01-15 19:56:41,307 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:56:42,011 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:56:42,011 WARN  [TaskQueue]: Client does not have enough free resources to perform this task! [49 < 51]; skipping: Client[host=63-server:23344,state=ONLINE,lastUpdate=Sat Jan 15 19:56:42 EST 2011]
2011-01-15 19:56:42,011 INFO  [ListenerClient]: Disconnected from 63-server:23344
2011-01-15 19:56:42,761 INFO  [Listener]: Received connection from: /192.168.15.11
2011-01-15 19:56:43,042 INFO  [Handler]: CMD: UPDATE :: PEER: /192.168.15.11
2011-01-15 19:56:43,042 INFO  [TaskQueue]: Assigned task 237 of type 'HDCOMSKIP' to Client[host=63-slave:23344,state=ONLINE,lastUpdate=Sat Jan 15 19:56:39 EST 2011]
2011-01-15 19:56:43,246 INFO  [ListenerClient]: Disconnected from 63-slave:23344
2011-01-15 19:56:43,261 INFO  [TaskQueue]: Scheduling queue processor for ~8 seconds from now!
2011-01-15 19:56:43,746 INFO  [Handler]: CMD: QUIT :: PEER: /192.168.15.11
2011-01-15 19:56:51,264 INFO  [TaskQueue]: Running queue processor now!
2011-01-15 19:56:51,421 INFO  [ListenerClient]: Disconnected from 63-server:23344
2011-01-15 19:56:51,421 INFO  [ActiveTaskManager]: Validated 1 running task(s)!
Reply With Quote
  #315  
Old 01-15-2011, 07:41 PM
ewelin ewelin is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Cambridge, MA
Posts: 165
Send a message via AIM to ewelin Send a message via MSN to ewelin Send a message via Yahoo to ewelin
so i have a 2nd win7 machine that I have used as a client with sjq3 in the past but wasn't planning on it with sjq4. Anyways, I installed the windows service on it. copied over the properties file from the agent that keeps marking tasks returned and added it to SJQ. It's doing the exact same thing with returning each task as returned.
Reply With Quote
  #316  
Old 01-15-2011, 11:42 PM
dadavo dadavo is offline
Sage User
 
Join Date: Sep 2007
Posts: 58
Quote:
Originally Posted by Slugger View Post
If you're running via cron then no env vars are ever going to be available. You'll have to find the media file of interest via groovy then pull all the info from the Sage API. So assuming you've found the media file of interest and stored it in a variable called mf:

String desc = MediaFileAPI.GetMediaFileFormatDescription(mf)

Then use the desc variable as an argument to the batch file you're calling (presumably from groovy). You'd pull the path and file names in similar fashion using the MediaFileAPI and pass those as arguments to the batch file as well.
I have resolved my issue. The problem was the location set in the client had .GROOVY in uppercase. Changing that resolved my issue. I also had this problem with the Test Script Arguments being in uppercase. I am sorry if I misunderstood that you meant the extension in the client settings should be lowercase or uppercase, not the actual file extension.
Reply With Quote
  #317  
Old 01-16-2011, 03:19 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
@ewelin I don't see any DEBUG log messages being printed anywhere. Did you restart the agent after changing the log level settings?

Alternatively, change the script to something dead easy and see if it runs successfully. I'm just not sure what the issue is at this point.
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
  #318  
Old 01-16-2011, 08:32 AM
ewelin ewelin is offline
Sage Advanced User
 
Join Date: Sep 2008
Location: Cambridge, MA
Posts: 165
Send a message via AIM to ewelin Send a message via MSN to ewelin Send a message via Yahoo to ewelin
Yup, I had restarted the server at 54, watched the queue and the tasked was returned at 55 so I stopped the log at 56. I'll re-run it and provide a longer timeframe later this morning. I just don't get it cause the same script is running on the server's agent just fine.
Reply With Quote
  #319  
Old 01-17-2011, 02:01 AM
phelme's Avatar
phelme phelme is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 1,151
Quote:
Originally Posted by awhenry View Post
...as I don't think there is a way to leverage resource allocation and multiple clients using the cron method alone since cron only runs on the server. Once queued, presumably clients capable of running those tasks would pick them off the queue and run them as resources are available.
Slugger: Need a clarification based on awhenry's statement. Are cron based tasks' resources monitored like trigger based tasks? If not, I'd have to take a differing direction on what I'm doing as currently I'd be relying on a cron task not being executed because there wouldn't be enough resources would be available.

yes, I could just try this out and see what happens but I figured it would be easier to simply ask first.
__________________
Server: AMD 9600 Phenom on XP, Gigabyte GA-MA78GPM, 2GB RAM, 320+250+500 GB SATA drives, HDHomeRun Prime, HD-PVR x.5.1, Paterson serial
Client/Encoder:AMD 3800+ X2, 512 MB RAM, ATI X1650 XT, nMediaPC case, Hauppauge HD-PVR, Cyberlink/ArcSoft decoders, USB-UIRT
Client/Encoder: AMD 3800+ X2, 512 MB RAM, 6150 graphics, nMediaPC case, ArcSoft decoders
Client: HD300, Asus Pundit P1-AH1, AMD 3800+ X2 CPU, 1 GB RAM, 6150 graphics, ArcSoft decoders
Backup: Synology
SageTV version: FINAL
Reply With Quote
  #320  
Old 01-17-2011, 08:15 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by phelme View Post
Slugger: Need a clarification based on awhenry's statement. Are cron based tasks' resources monitored like trigger based tasks? If not, I'd have to take a differing direction on what I'm doing as currently I'd be relying on a cron task not being executed because there wouldn't be enough resources would be available.

yes, I could just try this out and see what happens but I figured it would be easier to simply ask first.
Tasks queued up via cron are treated the same way as tasks queued up via Sage events. But it depends on how you implement your cron based task. Let's take the recently popular "scan and process" implementation everyone wants to see return from SJQv3.

In v4, to accomplish this you'd have to have a groovy script that looks like this:

Code:
for(Object mediaFile : MediaFileAPI.GetMediaFiles()) {
   if(<Whatever conditions you want to check for...) {
      // Do your task
   }
}
It's how you implement the "do your task" that is important. If you just call your exe in that block then there is no resource management/client distribution for the task. The loop simply runs and does the exe on each file it finds that matches.

However, if inside that if block you queue up the tasks you want to do (i.e. COMSKIP) and put COMKSKIP tasks into the queue for each matching file then SJQ will process all of those additional tasks you've queued up using all of the resource/client rules/allocations as defined.

The difference might seem subtle, but hopefully it's clear?
__________________
Twitter: @ddb_db
Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive
Capture: 2 x Colossus
STB Controller: 1 x USB-UIRT
Software:Java 1.7.0_71; SageTV 7.1.9
Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter
Plugins: Too many to list now...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin: MizookLCD (Alternate SageTV LCDSmartie Plugin) cslatt SageTV Customizations 48 06-11-2012 10:44 AM
SJQv4: Technology Preview Slugger SageTV v7 Customizations 39 12-17-2010 01:17 PM
SageTV Plugin Developers: Any way to see stats for your plugin? mkanet SageTV Software 4 12-12-2010 10:33 PM
MediaPlayer Plugin/STV Import: Winamp Media Player Plugin deria SageTV Customizations 447 12-11-2010 07:38 PM
SJQv4: Design Discussion Slugger SageTV v7 Customizations 26 10-18-2010 08:22 AM


All times are GMT -6. The time now is 07:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.