Skip to content

Instantly share code, notes, and snippets.

View zvercodebender's full-sized avatar

Rick Broker zvercodebender

View GitHub Profile
@zvercodebender
zvercodebender / TaskMonitorCleanup.py
Last active October 30, 2015 00:38
A small XL Deploy CLI script to clean up and archive tasks
import com.xebialabs.deployit.engine.api.execution.TaskExecutionState as TaskExecutionState
taskList = task2.getAllCurrentTasks()
for task in taskList:
if task.state == TaskExecutionState.EXECUTED :
print "Archive : %s %s %s %s" % ( task.id, task.description, task.owner, task.state )
task2.archive( task.id )
elif task.state == TaskExecutionState.FAILED :
print "Canceling: %s %s %s %s" % ( task.id, task.description, task.owner, task.state )
import httplib, urllib
import base64
import re
class ServerService:
def __init__(self):
communicatorField = deployit.getClass().getDeclaredField("communicator")
communicatorField.setAccessible(True)
communicator = communicatorField.get(deployit.delegate)