1 | static boolean hyperMoveAnother(S progID, S machine1, S machine2) ctex { |
2 | S botID = formatSnippetID(progID); |
3 | |
4 | print("Hyper-Move: Checking applicability."); |
5 | if (!canHyperMove(botID)) { |
6 | print("Hyper-Move: Can't move, not on this machine."); |
7 | ret false; |
8 | } |
9 | |
10 | print("Hyper-Move: Killing bot to move it..."); |
11 | killProgramID(botID); |
12 | print("Hyper-Move: OK, done."); |
13 | |
14 | S destMachine = getComputerID().equals(machine2) ? machine1 : machine2; |
15 | print("Hyper-Move: Moving " + botID + " to " + destMachine + "..."); |
16 | |
17 | File zipPath = new File(getProgramDir(), botID + ".zip"); |
18 | boolean hasData = zipBot(botID, zipPath); |
19 | |
20 | S title = "Data zip of " + botID + " on " + computerID() + " at " + now(); |
21 | S gummipw = getProgramID() + "-hypermove"; |
22 | S dataID = hasData ? uploadDataSuperHigh(gummipw, title, zipPath) : "#1001471" /* no data */; |
23 | |
24 | sendToRemoteBot("Identity Manager", format3("* is now in state * with data * to machine *", botID, "moving", dataID, destMachine)); |
25 | |
26 | print("\nDone. Data ID: " + dataID); |
27 | ret true; |
28 | } |
Began life as a copy of #1001368
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001466 |
Snippet name: | hyperMoveAnother (move another program between two machines) |
Eternal ID of this version: | #1001466/1 |
Text MD5: | bdf22cfdf299570989379c6bcc659f6f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-10-17 19:27:07 |
Source code size: | 1073 bytes / 28 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 688 / 848 |
Referenced in: | [show references] |