farming custom scripts

General discussions and questions.
Post Reply
User avatar
lulu116
Posts: 13
Joined: Mon Oct 02, 2017 5:26 pm
Location: Paris - France

farming custom scripts

Post by lulu116 » Tue Oct 10, 2017 1:51 pm

hello
I have some custom scripts that generates images.
"myscript -f 100 110" would generate "image.{0100,0110}.png" for example...
I'm trying to find how I could submit that kind of custom commands to afanasy.
so far I understand you have to create a .json description of the job but I'm not sure how I have to handle "service" and "parser" for that kind of thing.

if someone could give me some hints or examples how to do that it would be great.
luc
KDE neon User Edition 5.10 - 16.04 - xenial - No windows for me thanks

User avatar
timurhai
Site Admin
Posts: 262
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: farming custom scripts

Post by timurhai » Sat Oct 14, 2017 8:38 am

Hi.
Better to use Python API:
http://cgru.info/afanasy/api#python

It should be very simple:

Code: Select all

j=af.Job('job_name')
b=af.Block('block_name')
b.setCommand('myscript -f @###@ @###@')
b.setNumeric( 100, 110, 1, 1)
j.blocks.append(b)
j.send()
- but i did not check this code
Timur Hairulin
CGRU 2.2.3 Ubuntu 14.04LTS (gcc4.8.4)

User avatar
lulu116
Posts: 13
Joined: Mon Oct 02, 2017 5:26 pm
Location: Paris - France

Re: farming custom scripts

Post by lulu116 » Sat Oct 14, 2017 10:27 am

thank you.it's working fine.luc
KDE neon User Edition 5.10 - 16.04 - xenial - No windows for me thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests