Page 1 of 1
automatic archives downloading using pr-downloader
Posted: 28 Jan 2015, 01:05
by Jools
I wonder how much work would remains to integrate automatic archives downloading to spads. I mean, if the module pr-downloader can be made to work, it's as simple as giving the command:
Code: Select all
pr-downloader --filesystem-writepath=<springDataDir> --downloadgame <rapidtag>
springDataDir is already known by spads.
With this functionality added it would be possible spads to lobbies in the same way as springie is now. With springie, if you want a new host you just issue the command !spawn mod=rapidtag and it opens a new autohost.
Re: SPADS AutoHost
Posted: 28 Jan 2015, 01:12
by Nemo
We did this on the S44 SPADS host:
grabs the latest tag for S44 and asks if you want to !rehost with the newer version. It works great for us, because we're awful at cutting releases, but push to the git version frequently.
ThinkSome has the source of the plugin. Yuritch hacked it originally to work via git, TS updated it for rapid and pr-downloader.
Re: SPADS AutoHost
Posted: 28 Jan 2015, 01:55
by Jools
Cool, that's what I was thinking about.
What about testing on development version of engine? pr-downloader can also download that, I guess spads has the config tag for where the engine is located but the unitsync library has to be re-generated I think, so is it possible to just !rehost the autohost from lobby?
Re: SPADS AutoHost
Posted: 29 Jan 2015, 15:06
by Jools
Nemo wrote:
ThinkSome has the source of the plugin. Yuritch hacked it originally to work via git, TS updated it for rapid and pr-downloader.
I now got pr-downloader working.
I have some issues with getting crontab to do its job. How did you manage to get the !s44update command to launch pr-downloader. Can spads launch external programs just like that?
Re: SPADS AutoHost
Posted: 29 Jan 2015, 15:13
by TurBoss
Jools wrote:
I have some issues with getting crontab to do its job.
put this in the top of $ crontab -e
Code: Select all
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/pathtopr-dowloaderbin
Re: SPADS AutoHost
Posted: 29 Jan 2015, 17:47
by bibim
Jools wrote:I have some issues with getting crontab to do its job. How did you manage to get the !s44update command to launch pr-downloader. Can spads launch external programs just like that?
You can easily launch any external program from SPADS in an asynchronous way, there is a function in the plugin API done just for that:
forkProcess. It will track for you the state of the child process and call you back on completion, giving you the exit code. You can see an example of that in the
DownloadArchives plugin, which calls wget to download files and sends messages on download completion/failure.
Re: SPADS AutoHost
Posted: 30 Jan 2015, 00:57
by Jools
bibim wrote:
You can easily launch any external program from SPADS in an asynchronous way, there is a function in the plugin API done just for that:
forkProcess.
Thanks. I now got it working so that you can spawn a new host also in spads with a command called !spawn hostname. It's already implemented in xta autohosts. The source is integrated with a plugin what kicks you from host if you say the word "semprini" so it may not be suitable on every autohost :)
It works for some predefined hostnames that already are defined on the server. I guess it would be possible to generate one dyncamically too. And also for spawning one with a new engine.