Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

35
LINES

< > BotCompany Repo | #1001351 // Kill, zip, upload & MOVE a bot

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1153L/10K/30K).

!747

m {
  static S botID = "#1001325"; // Heart (loud)
  static S dataID;

  // We alternate between two machines as a test.
  static S machine1 = "teubizvjbppd";
  static S machine2 = "dhtvkmknsjym";
  
  static int compressionLevel = 9; // highest!

  p {
    if (args.length != 0) botID = args[0];
    S destMachine = getComputerID().equals(machine2) ? machine1 : machine2;
    
    botID = formatSnippetID(botID);
    
    print("Killing bot to move it...");
    killProgramID(botID);
    print("OK, proceeding with zipping.");
    
    File zipPath = new File(getProgramDir(), botID + ".zip");
    zipBot_compressionLevel = compressionLevel;
    zipBot(botID, zipPath);
    
    S title = "Data zip of " + botID + " on " + computerID() + " at " + now();
    S gummipw = getProgramID();
    dataID = uploadDataSuperHigh(gummipw, title, zipPath);
    
    sendToRemoteBot("Identity Manager", format3("* is now in state * with data * to machine *", botID, "moving", dataID, destMachine));
    
    print("\nDone. Data ID: " + dataID);
  }
}

Author comment

Began life as a copy of #1001341

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, dhtvkmknsjym, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001351
Snippet name: Kill, zip, upload & MOVE a bot
Eternal ID of this version: #1001351/1
Text MD5: 09e3a309153f5cb30467581452baadf8
Transpilation MD5: 636e0ad963f33e03b21a2877798845d8
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-11 20:52:21
Source code size: 1078 bytes / 35 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 645 / 948
Referenced in: #1001358 - Jumping Heart (jumps between two machines)
#1001368 - hyperMove (jump between two machines)
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000238 - Answer for stefanreich (>> t power bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)